]> git.datanom.net - securemail.git/blobdiff - cryptonize.py
Make backwards compatible with nacl 1.0.x
[securemail.git] / 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.040374 seconds and 5 git commands to generate.