aboutsummaryrefslogtreecommitdiffstats
path: root/src/constructs/srp6
diff options
context:
space:
mode:
Diffstat (limited to 'src/constructs/srp6')
-rw-r--r--src/constructs/srp6/srp6.cpp10
-rw-r--r--src/constructs/srp6/srp6.h4
-rw-r--r--src/constructs/srp6/srp6_files.cpp4
-rw-r--r--src/constructs/srp6/srp6_files.h6
4 files changed, 12 insertions, 12 deletions
diff --git a/src/constructs/srp6/srp6.cpp b/src/constructs/srp6/srp6.cpp
index 0eccdc154..569454350 100644
--- a/src/constructs/srp6/srp6.cpp
+++ b/src/constructs/srp6/srp6.cpp
@@ -48,7 +48,7 @@ BigInt hash_seq(const std::string& hash_id,
BigInt compute_x(const std::string& hash_id,
const std::string& identifier,
const std::string& password,
- const MemoryRegion<byte>& salt)
+ const std::vector<byte>& salt)
{
std::unique_ptr<HashFunction> hash_fn(
global_state().algorithm_factory().make_hash_function(hash_id));
@@ -57,12 +57,12 @@ BigInt compute_x(const std::string& hash_id,
hash_fn->update(":");
hash_fn->update(password);
- SecureVector<byte> inner_h = hash_fn->final();
+ secure_vector<byte> inner_h = hash_fn->final();
hash_fn->update(salt);
hash_fn->update(inner_h);
- SecureVector<byte> outer_h = hash_fn->final();
+ secure_vector<byte> outer_h = hash_fn->final();
return BigInt::decode(outer_h);
}
@@ -97,7 +97,7 @@ srp6_client_agree(const std::string& identifier,
const std::string& password,
const std::string& group_id,
const std::string& hash_id,
- const MemoryRegion<byte>& salt,
+ const std::vector<byte>& salt,
const BigInt& B,
RandomNumberGenerator& rng)
{
@@ -129,7 +129,7 @@ srp6_client_agree(const std::string& identifier,
BigInt generate_srp6_verifier(const std::string& identifier,
const std::string& password,
- const MemoryRegion<byte>& salt,
+ const std::vector<byte>& salt,
const std::string& group_id,
const std::string& hash_id)
{
diff --git a/src/constructs/srp6/srp6.h b/src/constructs/srp6/srp6.h
index 4fd127c70..b34253d7a 100644
--- a/src/constructs/srp6/srp6.h
+++ b/src/constructs/srp6/srp6.h
@@ -33,7 +33,7 @@ BOTAN_DLL srp6_client_agree(const std::string& username,
const std::string& password,
const std::string& group_id,
const std::string& hash_id,
- const MemoryRegion<byte>& salt,
+ const std::vector<byte>& salt,
const BigInt& B,
RandomNumberGenerator& rng);
@@ -45,7 +45,7 @@ BOTAN_DLL srp6_client_agree(const std::string& username,
*/
BigInt BOTAN_DLL generate_srp6_verifier(const std::string& identifier,
const std::string& password,
- const MemoryRegion<byte>& salt,
+ const std::vector<byte>& salt,
const std::string& group_id,
const std::string& hash_id);
diff --git a/src/constructs/srp6/srp6_files.cpp b/src/constructs/srp6/srp6_files.cpp
index bc321745f..4df2986f3 100644
--- a/src/constructs/srp6/srp6_files.cpp
+++ b/src/constructs/srp6/srp6_files.cpp
@@ -31,7 +31,7 @@ SRP6_Authenticator_File::SRP6_Authenticator_File(const std::string& filename)
std::string username = parts[0];
BigInt v = BigInt::decode(base64_decode(parts[1]));
- MemoryVector<byte> salt = base64_decode(parts[2]);
+ std::vector<byte> salt = unlock(base64_decode(parts[2]));
BigInt group_id_idx = BigInt::decode(base64_decode(parts[3]));
std::string group_id;
@@ -51,7 +51,7 @@ SRP6_Authenticator_File::SRP6_Authenticator_File(const std::string& filename)
bool SRP6_Authenticator_File::lookup_user(const std::string& username,
BigInt& v,
- MemoryRegion<byte>& salt,
+ std::vector<byte>& salt,
std::string& group_id) const
{
std::map<std::string, SRP6_Data>::const_iterator i = entries.find(username);
diff --git a/src/constructs/srp6/srp6_files.h b/src/constructs/srp6/srp6_files.h
index 4e3293423..4e0d3ff02 100644
--- a/src/constructs/srp6/srp6_files.h
+++ b/src/constructs/srp6/srp6_files.h
@@ -28,7 +28,7 @@ class BOTAN_DLL SRP6_Authenticator_File
bool lookup_user(const std::string& username,
BigInt& v,
- MemoryRegion<byte>& salt,
+ std::vector<byte>& salt,
std::string& group_id) const;
private:
struct SRP6_Data
@@ -36,12 +36,12 @@ class BOTAN_DLL SRP6_Authenticator_File
SRP6_Data() {}
SRP6_Data(const BigInt& v,
- const MemoryRegion<byte>& salt,
+ const std::vector<byte>& salt,
const std::string& group_id) :
v(v), salt(salt), group_id(group_id) {}
BigInt v;
- MemoryVector<byte> salt;
+ std::vector<byte> salt;
std::string group_id;
};