rename get_null_for_ecb to get_iv_for_ecb per alex's comments
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py
index 02957d7..fd54a8f 100644
--- a/cryptography/bindings/openssl/api.py
+++ b/cryptography/bindings/openssl/api.py
@@ -86,7 +86,7 @@
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 8214143..e4fc886 100644
--- a/cryptography/primitives/block/modes.py
+++ b/cryptography/primitives/block/modes.py
@@ -29,4 +29,4 @@
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 c5927b7..f25236c 100644
--- a/tests/bindings/test_openssl.py
+++ b/tests/bindings/test_openssl.py
@@ -29,5 +29,5 @@
"""
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