From dc689293704e9181af452aaef495e4c417160e40 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 10 Sep 2013 10:50:06 -0500 Subject: rename get_null_for_ecb to get_iv_for_ecb per alex's comments --- cryptography/bindings/openssl/api.py | 2 +- cryptography/primitives/block/modes.py | 2 +- tests/bindings/test_openssl.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index 02957d74..fd54a8ff 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -86,7 +86,7 @@ class API(object): self._lib.EVP_CIPHER_CTX_set_padding(ctx, 0) return ctx - def get_null_for_ecb(self): + def get_iv_for_ecb(self): return self._ffi.NULL def update_encrypt_context(self, ctx, plaintext): diff --git a/cryptography/primitives/block/modes.py b/cryptography/primitives/block/modes.py index 82141437..e4fc886e 100644 --- a/cryptography/primitives/block/modes.py +++ b/cryptography/primitives/block/modes.py @@ -29,4 +29,4 @@ class ECB(object): name = "ECB" def get_iv_or_nonce(self, api): - return api.get_null_for_ecb() + return api.get_iv_for_ecb() diff --git a/tests/bindings/test_openssl.py b/tests/bindings/test_openssl.py index c5927b76..f25236cc 100644 --- a/tests/bindings/test_openssl.py +++ b/tests/bindings/test_openssl.py @@ -29,5 +29,5 @@ class TestOpenSSL(object): """ assert api.openssl_version_text().startswith("OpenSSL") - def test_get_null_for_ecb(self): - assert api.get_null_for_ecb() == api._ffi.NULL + def test_get_iv_for_ecb(self): + assert api.get_iv_for_ecb() == api._ffi.NULL -- cgit v1.2.3