diff options
author | lloyd <[email protected]> | 2013-12-31 18:19:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-12-31 18:19:18 +0000 |
commit | 24bfc2734b25c0df447413f6cee187745ff90079 (patch) | |
tree | 93296fa97468ad0ae927c6b9184b136ca8d5e919 /src/modes | |
parent | 98991e5c9326a480b890ef7ce112ebfb1216f1ae (diff) |
Set default offset for all cipher mode update/final signatures.
Diffstat (limited to 'src/modes')
-rw-r--r-- | src/modes/aead/ccm/ccm.h | 6 | ||||
-rw-r--r-- | src/modes/aead/eax/eax.h | 8 | ||||
-rw-r--r-- | src/modes/aead/gcm/gcm.h | 8 | ||||
-rw-r--r-- | src/modes/aead/ocb/ocb.h | 8 | ||||
-rw-r--r-- | src/modes/aead/siv/siv.h | 6 | ||||
-rw-r--r-- | src/modes/cbc/cbc.h | 12 | ||||
-rw-r--r-- | src/modes/cfb/cfb.h | 8 | ||||
-rw-r--r-- | src/modes/ecb/ecb.h | 8 | ||||
-rw-r--r-- | src/modes/xts/xts.h | 8 |
9 files changed, 36 insertions, 36 deletions
diff --git a/src/modes/aead/ccm/ccm.h b/src/modes/aead/ccm/ccm.h index b9ce0b30b..87dd5805c 100644 --- a/src/modes/aead/ccm/ccm.h +++ b/src/modes/aead/ccm/ccm.h @@ -25,7 +25,7 @@ class BOTAN_DLL CCM_Mode : public AEAD_Mode public: secure_vector<byte> start(const byte nonce[], size_t nonce_len) override; - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; void set_associated_data(const byte ad[], size_t ad_len) override; @@ -88,7 +88,7 @@ class BOTAN_DLL CCM_Encryption : public CCM_Mode CCM_Encryption(BlockCipher* cipher, size_t tag_size = 16, size_t L = 3) : CCM_Mode(cipher, tag_size, L) {} - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override { return input_length + tag_size(); } @@ -112,7 +112,7 @@ class BOTAN_DLL CCM_Decryption : public CCM_Mode CCM_Decryption(BlockCipher* cipher, size_t tag_size = 16, size_t L = 3) : CCM_Mode(cipher, tag_size, L) {} - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override { diff --git a/src/modes/aead/eax/eax.h b/src/modes/aead/eax/eax.h index a4673a34f..b6f1653bb 100644 --- a/src/modes/aead/eax/eax.h +++ b/src/modes/aead/eax/eax.h @@ -78,9 +78,9 @@ class BOTAN_DLL EAX_Encryption : public EAX_Mode size_t minimum_final_size() const override { return 0; } - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; }; /** @@ -104,9 +104,9 @@ class BOTAN_DLL EAX_Decryption : public EAX_Mode size_t minimum_final_size() const override { return tag_size(); } - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; }; } diff --git a/src/modes/aead/gcm/gcm.h b/src/modes/aead/gcm/gcm.h index 80c5951f9..12d66a3d1 100644 --- a/src/modes/aead/gcm/gcm.h +++ b/src/modes/aead/gcm/gcm.h @@ -71,9 +71,9 @@ class BOTAN_DLL GCM_Encryption : public GCM_Mode size_t minimum_final_size() const override { return 0; } - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; }; /** @@ -97,9 +97,9 @@ class BOTAN_DLL GCM_Decryption : public GCM_Mode size_t minimum_final_size() const override { return tag_size(); } - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; }; /** diff --git a/src/modes/aead/ocb/ocb.h b/src/modes/aead/ocb/ocb.h index b4f24f281..e7d042de3 100644 --- a/src/modes/aead/ocb/ocb.h +++ b/src/modes/aead/ocb/ocb.h @@ -87,9 +87,9 @@ class BOTAN_DLL OCB_Encryption : public OCB_Mode size_t minimum_final_size() const override { return 0; } - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; private: void encrypt(byte input[], size_t blocks); }; @@ -112,9 +112,9 @@ class BOTAN_DLL OCB_Decryption : public OCB_Mode size_t minimum_final_size() const override { return tag_size(); } - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; private: void decrypt(byte input[], size_t blocks); }; diff --git a/src/modes/aead/siv/siv.h b/src/modes/aead/siv/siv.h index 612d29bb7..31df4d049 100644 --- a/src/modes/aead/siv/siv.h +++ b/src/modes/aead/siv/siv.h @@ -24,7 +24,7 @@ class BOTAN_DLL SIV_Mode : public AEAD_Mode public: secure_vector<byte> start(const byte nonce[], size_t nonce_len) override; - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; void set_associated_data_n(size_t n, const byte ad[], size_t ad_len); @@ -79,7 +79,7 @@ class BOTAN_DLL SIV_Encryption : public SIV_Mode */ SIV_Encryption(BlockCipher* cipher) : SIV_Mode(cipher) {} - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override { return input_length + tag_size(); } @@ -98,7 +98,7 @@ class BOTAN_DLL SIV_Decryption : public SIV_Mode */ SIV_Decryption(BlockCipher* cipher) : SIV_Mode(cipher) {} - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override { diff --git a/src/modes/cbc/cbc.h b/src/modes/cbc/cbc.h index 726d5d080..0a10f3661 100644 --- a/src/modes/cbc/cbc.h +++ b/src/modes/cbc/cbc.h @@ -66,9 +66,9 @@ class BOTAN_DLL CBC_Encryption : public CBC_Mode CBC_Encryption(BlockCipher* cipher, BlockCipherModePaddingMethod* padding) : CBC_Mode(cipher, padding) {} - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override; @@ -85,7 +85,7 @@ class BOTAN_DLL CTS_Encryption : public CBC_Encryption size_t output_length(size_t input_length) const override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t minimum_final_size() const override; @@ -101,9 +101,9 @@ class BOTAN_DLL CBC_Decryption : public CBC_Mode CBC_Decryption(BlockCipher* cipher, BlockCipherModePaddingMethod* padding) : CBC_Mode(cipher, padding), m_tempbuf(update_granularity()) {} - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override; @@ -120,7 +120,7 @@ class BOTAN_DLL CTS_Decryption : public CBC_Decryption public: CTS_Decryption(BlockCipher* cipher) : CBC_Decryption(cipher, nullptr) {} - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t minimum_final_size() const override; diff --git a/src/modes/cfb/cfb.h b/src/modes/cfb/cfb.h index 984e5cb96..48be0a2d9 100644 --- a/src/modes/cfb/cfb.h +++ b/src/modes/cfb/cfb.h @@ -67,9 +67,9 @@ class BOTAN_DLL CFB_Encryption : public CFB_Mode CFB_Encryption(BlockCipher* cipher, size_t feedback_bits) : CFB_Mode(cipher, feedback_bits) {} - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; }; /** @@ -81,9 +81,9 @@ class BOTAN_DLL CFB_Decryption : public CFB_Mode CFB_Decryption(BlockCipher* cipher, size_t feedback_bits) : CFB_Mode(cipher, feedback_bits) {} - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; }; } diff --git a/src/modes/ecb/ecb.h b/src/modes/ecb/ecb.h index 9545a33ea..441eafbc1 100644 --- a/src/modes/ecb/ecb.h +++ b/src/modes/ecb/ecb.h @@ -57,9 +57,9 @@ class BOTAN_DLL ECB_Encryption : public ECB_Mode ECB_Encryption(BlockCipher* cipher, BlockCipherModePaddingMethod* padding) : ECB_Mode(cipher, padding) {} - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override; @@ -75,9 +75,9 @@ class BOTAN_DLL ECB_Decryption : public ECB_Mode ECB_Decryption(BlockCipher* cipher, BlockCipherModePaddingMethod* padding) : ECB_Mode(cipher, padding) {} - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override; diff --git a/src/modes/xts/xts.h b/src/modes/xts/xts.h index 49f2a3458..21bc495e1 100644 --- a/src/modes/xts/xts.h +++ b/src/modes/xts/xts.h @@ -59,9 +59,9 @@ class BOTAN_DLL XTS_Encryption : public XTS_Mode public: XTS_Encryption(BlockCipher* cipher) : XTS_Mode(cipher) {} - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override; }; @@ -74,9 +74,9 @@ class BOTAN_DLL XTS_Decryption : public XTS_Mode public: XTS_Decryption(BlockCipher* cipher) : XTS_Mode(cipher) {} - void update(secure_vector<byte>& blocks, size_t offset) override; + void update(secure_vector<byte>& blocks, size_t offset = 0) override; - void finish(secure_vector<byte>& final_block, size_t offset) override; + void finish(secure_vector<byte>& final_block, size_t offset = 0) override; size_t output_length(size_t input_length) const override; }; |