[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Fix Python3 bytes type issue using Cryptography.



commit 23ab3005664b951af6135f18472cbccb178fc988
Author: Paras Chetal <paras.chetal@xxxxxxxxx>
Date:   Sat Mar 4 14:33:50 2017 -0800

    Fix Python3 bytes type issue using Cryptography.
    
    Signed-off-by: Patrick O'Doherty <p@xxxxxxxxxxx>
---
 stem/descriptor/hidden_service_descriptor.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/descriptor/hidden_service_descriptor.py b/stem/descriptor/hidden_service_descriptor.py
index ce3a134..dc42286 100644
--- a/stem/descriptor/hidden_service_descriptor.py
+++ b/stem/descriptor/hidden_service_descriptor.py
@@ -326,7 +326,7 @@ class HiddenServiceDescriptor(Descriptor):
 
       # try decrypting the session key
 
-      cipher = Cipher(algorithms.AES(authentication_cookie), modes.CTR('\x00' * len(iv)), default_backend())
+      cipher = Cipher(algorithms.AES(authentication_cookie), modes.CTR(stem.util.str_tools._to_bytes('\x00' * len(iv))), default_backend())
       decryptor = cipher.decryptor()
       session_key = decryptor.update(encrypted_session_key) + decryptor.finalize()
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits