]> git.datanom.net - securemail.git/commitdiff
Make backwards compatible with nacl 1.0.x
authorMichael Rasmussen <mir@datanom.net>
Sat, 11 Aug 2018 23:19:18 +0000 (01:19 +0200)
committerMichael Rasmussen <mir@datanom.net>
Sat, 11 Aug 2018 23:19:18 +0000 (01:19 +0200)
cryptonize.py

index d4b511596e803b308995bf7c472b81a929054ae7..d24a72ba20b3a2fa71a2ea8f333e297463e96403 100644 (file)
@@ -33,8 +33,6 @@ class Cryptonize:
         skey = self.sanitize_key(key)
         box = SecretBox(skey)
         if NACL_VERSION < "1.1.0":
-            from nacl.utils import random
-            from nacl.public import SecretBox
             nonce = random(SecretBox.NONCE_SIZE)
             cipher = box.encrypt(plain, nonce)
         else:
This page took 0.183044 seconds and 5 git commands to generate.