diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-08-09 10:14:47 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-08-09 10:14:47 -0700 |
commit | dfb76e49b6e957ee367f67be4507974bbc48173f (patch) | |
tree | b8c4fb325920e508343d4912e45b68117a6c6a1a | |
parent | a5c6487bce797136d3778c9edc6780fd9dd005de (diff) | |
download | cryptography-dfb76e49b6e957ee367f67be4507974bbc48173f.tar.gz cryptography-dfb76e49b6e957ee367f67be4507974bbc48173f.tar.bz2 cryptography-dfb76e49b6e957ee367f67be4507974bbc48173f.zip |
More TODOs
-rw-r--r-- | cryptography/bindings/openssl/api.py | 3 | ||||
-rw-r--r-- | cryptography/primitives/block/base.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index ec6b923a..ba6fbb83 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -65,7 +65,8 @@ class API(object): evp_cipher = self._lib.EVP_get_cipherbyname(ciphername) if evp_cipher == self._ffi.NULL: raise OpenSSLError(self) - # TODO: only use the key and initialization_vector as needed + # TODO: only use the key and initialization_vector as needed. Sometimes + # this needs to be a DecryptInit, when? res = self._lib.EVP_EncryptInit_ex(ctx, evp_cipher, self._ffi.NULL, cipher.key, mode.initialization_vector) if res == 0: raise OpenSSLError(self) diff --git a/cryptography/primitives/block/base.py b/cryptography/primitives/block/base.py index ed37685d..8faafadd 100644 --- a/cryptography/primitives/block/base.py +++ b/cryptography/primitives/block/base.py @@ -14,6 +14,7 @@ class BlockCipher(object): return api.update_encrypt_context(self._ctx, plaintext) def finalize(self): + # TODO: this might be a decrypt context result = api.finalize_encrypt_context(self._ctx) self._ctx = None return result |