aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-24 11:03:53 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-29 17:19:46 -0600
commitbc31fb22979df3f034ce286fab20da71be76fe58 (patch)
tree899fcd653e542d7f18f7bdb6e1c9587caccab37c /cryptography
parent2631c2b7be22f15f83810df1b8664bf388ad02a6 (diff)
downloadcryptography-bc31fb22979df3f034ce286fab20da71be76fe58.tar.gz
cryptography-bc31fb22979df3f034ce286fab20da71be76fe58.tar.bz2
cryptography-bc31fb22979df3f034ce286fab20da71be76fe58.zip
rename add_data to authenticate_additional_data for clarity (hopefully)
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/bindings/openssl/backend.py2
-rw-r--r--cryptography/hazmat/primitives/ciphers/base.py4
-rw-r--r--cryptography/hazmat/primitives/interfaces.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py
index 527706bc..1a534011 100644
--- a/cryptography/hazmat/bindings/openssl/backend.py
+++ b/cryptography/hazmat/bindings/openssl/backend.py
@@ -336,7 +336,7 @@ class _CipherContext(object):
assert res == 1
return self._backend.ffi.buffer(buf)[:outlen[0]]
- def add_data(self, data):
+ def authenticate_additional_data(self, data):
outlen = self._backend.ffi.new("int *")
res = self._backend.lib.EVP_CipherUpdate(
self._ctx, self._backend.ffi.NULL, outlen, data, len(data)
diff --git a/cryptography/hazmat/primitives/ciphers/base.py b/cryptography/hazmat/primitives/ciphers/base.py
index 7c315898..c8c4533b 100644
--- a/cryptography/hazmat/primitives/ciphers/base.py
+++ b/cryptography/hazmat/primitives/ciphers/base.py
@@ -98,12 +98,12 @@ class _AEADCipherContext(object):
self._ctx = None
return data
- def add_data(self, data):
+ def authenticate_additional_data(self, data):
if self._ctx is None:
raise AlreadyFinalized("Context was already finalized")
if self._updated:
raise AlreadyUpdated("Update has been called on this context")
- self._ctx.add_data(data)
+ self._ctx.authenticate_additional_data(data)
@property
def tag(self):
diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py
index f216686a..c0548dfd 100644
--- a/cryptography/hazmat/primitives/interfaces.py
+++ b/cryptography/hazmat/primitives/interfaces.py
@@ -86,9 +86,9 @@ class AEADCipherContext(six.with_metaclass(abc.ABCMeta)):
"""
@abc.abstractmethod
- def add_data(self, data):
+ def authenticate_additional_data(self, data):
"""
- add_data takes bytes and returns nothing.
+ authenticate_additional_data takes bytes and returns nothing.
"""