small commit before merge
parent
adf007bf30
commit
7098103445
|
@ -82,7 +82,6 @@ class OnionrCrypto:
|
||||||
retData = key.verify(data, sig) # .encode() is not the same as nacl.encoding
|
retData = key.verify(data, sig) # .encode() is not the same as nacl.encoding
|
||||||
except nacl.exceptions.BadSignatureError:
|
except nacl.exceptions.BadSignatureError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
retData = key.verify(data, sig)
|
retData = key.verify(data, sig)
|
||||||
|
@ -160,8 +159,6 @@ class OnionrCrypto:
|
||||||
decrypted = self.symmetricDecrypt(data, key, encodedKey=True)
|
decrypted = self.symmetricDecrypt(data, key, encodedKey=True)
|
||||||
return decrypted
|
return decrypted
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def symmetricEncrypt(self, data, key, encodedKey=False, returnEncoded=True):
|
def symmetricEncrypt(self, data, key, encodedKey=False, returnEncoded=True):
|
||||||
'''Encrypt data to a 32-byte key (Salsa20-Poly1305 MAC)'''
|
'''Encrypt data to a 32-byte key (Salsa20-Poly1305 MAC)'''
|
||||||
if encodedKey:
|
if encodedKey:
|
||||||
|
|
Loading…
Reference in New Issue