diff options
author | lloyd <[email protected]> | 2014-12-31 14:22:15 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-12-31 14:22:15 +0000 |
commit | 205bbde9dc315562f11c16e15c1787d84f0d0185 (patch) | |
tree | e71da172fae98c7d0424983ff00a295e8403e954 /src/lib/modes | |
parent | 9a59362b3b754abf1d06c14cfa7decf9ef16bd6e (diff) |
Add helper and update comment
Diffstat (limited to 'src/lib/modes')
-rw-r--r-- | src/lib/modes/aead/aead.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/modes/aead/aead.h b/src/lib/modes/aead/aead.h index 8df98fcad..5f6c1583d 100644 --- a/src/lib/modes/aead/aead.h +++ b/src/lib/modes/aead/aead.h @@ -26,8 +26,8 @@ class BOTAN_DLL AEAD_Mode : public Cipher_Mode /** * Set associated data that is not included in the ciphertext but - * that should be authenticated. Must be called after set_key - * and before finish. + * that should be authenticated. Must be called after set_key and + * before start. * * Unless reset by another call, the associated data is kept * between messages. Thus, if the AD does not change, calling @@ -44,6 +44,12 @@ class BOTAN_DLL AEAD_Mode : public Cipher_Mode set_associated_data(&ad[0], ad.size()); } + template<typename Alloc> + void set_ad(const std::vector<byte, Alloc>& ad) + { + set_associated_data(&ad[0], ad.size()); + } + /** * Default AEAD nonce size (a commonly supported value among AEAD * modes, and large enough that random collisions are unlikely). |