From dfb76e49b6e957ee367f67be4507974bbc48173f Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 9 Aug 2013 10:14:47 -0700 Subject: More TODOs --- cryptography/bindings/openssl/api.py | 3 ++- cryptography/primitives/block/base.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3