aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/dlies
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 02:45:00 +0000
committerlloyd <[email protected]>2010-10-13 02:45:00 +0000
commit63121e1e169616f724bf79b8aac1a2b4423c8904 (patch)
tree2375d5b5daaad8990b2cee951d137f2e7638e79b /src/pubkey/dlies
parent879d062c2b93e32362e338d1c6f9b1eda0f88493 (diff)
Use output_length() instead of OUTPUT_LENGTH pseudo-property
Diffstat (limited to 'src/pubkey/dlies')
-rw-r--r--src/pubkey/dlies/dlies.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pubkey/dlies/dlies.cpp b/src/pubkey/dlies/dlies.cpp
index 7b890b5ef..2b3f65d06 100644
--- a/src/pubkey/dlies/dlies.cpp
+++ b/src/pubkey/dlies/dlies.cpp
@@ -42,7 +42,7 @@ SecureVector<byte> DLIES_Encryptor::enc(const byte in[], size_t length,
if(other_key.empty())
throw Invalid_State("DLIES: The other key was never set");
- SecureVector<byte> out(my_key.size() + length + mac->OUTPUT_LENGTH);
+ SecureVector<byte> out(my_key.size() + length + mac->output_length());
out.copy(&my_key[0], my_key.size());
out.copy(my_key.size(), in, length);
@@ -110,14 +110,14 @@ DLIES_Decryptor::~DLIES_Decryptor()
*/
SecureVector<byte> DLIES_Decryptor::dec(const byte msg[], size_t length) const
{
- if(length < my_key.size() + mac->OUTPUT_LENGTH)
+ if(length < my_key.size() + mac->output_length())
throw Decoding_Error("DLIES decryption: ciphertext is too short");
- const size_t CIPHER_LEN = length - my_key.size() - mac->OUTPUT_LENGTH;
+ const size_t CIPHER_LEN = length - my_key.size() - mac->output_length();
SecureVector<byte> v(msg, my_key.size());
SecureVector<byte> C(msg + my_key.size(), CIPHER_LEN);
- SecureVector<byte> T(msg + my_key.size() + CIPHER_LEN, mac->OUTPUT_LENGTH);
+ SecureVector<byte> T(msg + my_key.size() + CIPHER_LEN, mac->output_length());
SecureVector<byte> vz(msg, my_key.size());
vz += ka.derive_key(0, v).bits_of();