aboutsummaryrefslogtreecommitdiffstats
path: root/src/constructs
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/constructs
parent879d062c2b93e32362e338d1c6f9b1eda0f88493 (diff)
Use output_length() instead of OUTPUT_LENGTH pseudo-property
Diffstat (limited to 'src/constructs')
-rw-r--r--src/constructs/tss/tss.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/constructs/tss/tss.cpp b/src/constructs/tss/tss.cpp
index e5c245873..f6f2344fd 100644
--- a/src/constructs/tss/tss.cpp
+++ b/src/constructs/tss/tss.cpp
@@ -207,7 +207,7 @@ RTSS_Share::reconstruct(const std::vector<RTSS_Share>& shares)
std::auto_ptr<HashFunction> hash(get_rtss_hash_by_id(hash_id));
- if(shares[0].size() != secret_len + hash->OUTPUT_LENGTH + RTSS_HEADER_SIZE + 1)
+ if(shares[0].size() != secret_len + hash->output_length() + RTSS_HEADER_SIZE + 1)
throw Decoding_Error("Bad RTSS length field in header");
std::vector<byte> V(shares.size());
@@ -244,14 +244,14 @@ RTSS_Share::reconstruct(const std::vector<RTSS_Share>& shares)
secret.push_back(r);
}
- if(secret.size() != secret_len + hash->OUTPUT_LENGTH)
+ if(secret.size() != secret_len + hash->output_length())
throw Decoding_Error("Bad length in RTSS output");
hash->update(&secret[0], secret_len);
SecureVector<byte> hash_check = hash->final();
if(!same_mem(&hash_check[0],
- &secret[secret_len], hash->OUTPUT_LENGTH))
+ &secret[secret_len], hash->output_length()))
throw Decoding_Error("RTSS hash check failed");
return SecureVector<byte>(&secret[0], secret_len);