Remove pycrypto dependency (fixes #10)

This commit is contained in:
Milan Stute
2019-08-20 10:53:46 +02:00
parent b5b21df47d
commit b8b942d0c0
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ import os
import platform
import plistlib
import socket
from Crypto.Hash import SHA, SHA256
import hashlib
from PIL import Image, ExifTags
from libarchive import ffi
from libarchive.entry import new_archive_entry, ArchiveEntry
@@ -121,8 +121,8 @@ class AirDropUtil:
valid_date = datetime.datetime.now() - datetime.timedelta(days=3)
valid_date_string = valid_date.strftime('%Y-%m-%dT%H:%M:%SZ')
emails_hashed = [SHA256.new(email.encode('utf-8')).hexdigest() for email in config.email]
phone_numbers_hashed = [SHA256.new(phone_number.encode('utf-8')).hexdigest() for phone_number in config.phone]
emails_hashed = [hashlib.sha256(email.encode('utf-8')).hexdigest() for email in config.email]
phone_numbers_hashed = [hashlib.sha256(phone_number.encode('utf-8')).hexdigest() for phone_number in config.phone]
# Get the common name of the TLS certificate
with open(tls_cert, 'rb') as cert_file:
+1 -1
View File
@@ -29,7 +29,7 @@ setup(
package_data={
'opendrop': ['certs/*.pem']
},
install_requires=['pycrypto', 'requests', 'fleep', 'netifaces', 'Pillow',
install_requires=['requests', 'fleep', 'netifaces', 'Pillow',
'requests_toolbelt', 'ctypescrypto', 'libarchive-c'],
entry_points={
'console_scripts': [