summaryrefslogtreecommitdiff
path: root/pwdbased.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-08-16 07:12:14 -0400
committerJeffrey Walton <noloader@gmail.com>2019-08-16 07:12:14 -0400
commite22700f741af9071b166a74dd904a1bb7910c6b9 (patch)
treea743990feaa3aa5735dc3475e1acdca2800c2215 /pwdbased.h
parentc0a5a06a8285c515336a7540095d75aaad628644 (diff)
downloadcryptopp-git-e22700f741af9071b166a74dd904a1bb7910c6b9.tar.gz
Fix use of MaxDerivedKeyLength (GH #874)
Diffstat (limited to 'pwdbased.h')
-rw-r--r--pwdbased.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/pwdbased.h b/pwdbased.h
index dcc23837..ded97aea 100644
--- a/pwdbased.h
+++ b/pwdbased.h
@@ -61,7 +61,7 @@ public:
/// \param iterations the number of iterations
/// \param timeInSeconds the in seconds
/// \returns the number of iterations performed
- /// \throws InvalidDerivedLength if <tt>derivedLen</tt> is invalid for the scheme
+ /// \throws InvalidDerivedKeyLength if <tt>derivedLen</tt> is invalid for the scheme
/// \details DeriveKey() provides a standard interface to derive a key from
/// a seed and other parameters. Each class that derives from KeyDerivationFunction
/// provides an overload that accepts most parameters used by the derivation function.
@@ -116,7 +116,7 @@ size_t PKCS5_PBKDF1<T>::DeriveKey(byte *derived, size_t derivedLen, byte purpose
CRYPTOPP_ASSERT(iterations > 0 || timeInSeconds > 0);
CRYPTOPP_UNUSED(purpose);
- ThrowIfInvalidDerivedLength(derivedLen);
+ ThrowIfInvalidDerivedKeyLength(derivedLen);
// Business logic
if (!iterations) { iterations = 1; }
@@ -187,7 +187,7 @@ public:
/// \param iterations the number of iterations
/// \param timeInSeconds the in seconds
/// \returns the number of iterations performed
- /// \throws InvalidDerivedLength if <tt>derivedLen</tt> is invalid for the scheme
+ /// \throws InvalidDerivedKeyLength if <tt>derivedLen</tt> is invalid for the scheme
/// \details DeriveKey() provides a standard interface to derive a key from
/// a seed and other parameters. Each class that derives from KeyDerivationFunction
/// provides an overload that accepts most parameters used by the derivation function.
@@ -241,7 +241,7 @@ size_t PKCS5_PBKDF2_HMAC<T>::DeriveKey(byte *derived, size_t derivedLen, byte pu
CRYPTOPP_ASSERT(iterations > 0 || timeInSeconds > 0);
CRYPTOPP_UNUSED(purpose);
- ThrowIfInvalidDerivedLength(derivedLen);
+ ThrowIfInvalidDerivedKeyLength(derivedLen);
// Business logic
if (!iterations) { iterations = 1; }
@@ -344,7 +344,7 @@ public:
/// \param iterations the number of iterations
/// \param timeInSeconds the in seconds
/// \returns the number of iterations performed
- /// \throws InvalidDerivedLength if <tt>derivedLen</tt> is invalid for the scheme
+ /// \throws InvalidDerivedKeyLength if <tt>derivedLen</tt> is invalid for the scheme
/// \details DeriveKey() provides a standard interface to derive a key from
/// a seed and other parameters. Each class that derives from KeyDerivationFunction
/// provides an overload that accepts most parameters used by the derivation function.
@@ -398,7 +398,7 @@ size_t PKCS12_PBKDF<T>::DeriveKey(byte *derived, size_t derivedLen, byte purpose
CRYPTOPP_ASSERT(derivedLen <= MaxDerivedKeyLength());
CRYPTOPP_ASSERT(iterations > 0 || timeInSeconds > 0);
- ThrowIfInvalidDerivedLength(derivedLen);
+ ThrowIfInvalidDerivedKeyLength(derivedLen);
// Business logic
if (!iterations) { iterations = 1; }