diff options
author | Jack Lloyd <[email protected]> | 2016-12-11 15:28:38 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-18 16:48:24 -0500 |
commit | f3cb3edb512bdcab498d825886c3366c341b3f78 (patch) | |
tree | 645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/misc/srp6 | |
parent | c1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff) |
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency,
eg make_u32bit becomes make_uint32. The old typedefs remain for now
since probably lots of application code uses them.
Diffstat (limited to 'src/lib/misc/srp6')
-rw-r--r-- | src/lib/misc/srp6/srp6.cpp | 10 | ||||
-rw-r--r-- | src/lib/misc/srp6/srp6.h | 4 | ||||
-rw-r--r-- | src/lib/misc/srp6/srp6_files.cpp | 4 | ||||
-rw-r--r-- | src/lib/misc/srp6/srp6_files.h | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/misc/srp6/srp6.cpp b/src/lib/misc/srp6/srp6.cpp index f54726151..12107715f 100644 --- a/src/lib/misc/srp6/srp6.cpp +++ b/src/lib/misc/srp6/srp6.cpp @@ -29,7 +29,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 std::vector<byte>& salt) + const std::vector<uint8_t>& salt) { std::unique_ptr<HashFunction> hash_fn(HashFunction::create_or_throw(hash_id)); @@ -37,12 +37,12 @@ BigInt compute_x(const std::string& hash_id, hash_fn->update(":"); hash_fn->update(password); - secure_vector<byte> inner_h = hash_fn->final(); + secure_vector<uint8_t> inner_h = hash_fn->final(); hash_fn->update(salt); hash_fn->update(inner_h); - secure_vector<byte> outer_h = hash_fn->final(); + secure_vector<uint8_t> outer_h = hash_fn->final(); return BigInt::decode(outer_h); } @@ -77,7 +77,7 @@ srp6_client_agree(const std::string& identifier, const std::string& password, const std::string& group_id, const std::string& hash_id, - const std::vector<byte>& salt, + const std::vector<uint8_t>& salt, const BigInt& B, RandomNumberGenerator& rng) { @@ -109,7 +109,7 @@ srp6_client_agree(const std::string& identifier, BigInt generate_srp6_verifier(const std::string& identifier, const std::string& password, - const std::vector<byte>& salt, + const std::vector<uint8_t>& salt, const std::string& group_id, const std::string& hash_id) { diff --git a/src/lib/misc/srp6/srp6.h b/src/lib/misc/srp6/srp6.h index 5db433ad6..af9f427d0 100644 --- a/src/lib/misc/srp6/srp6.h +++ b/src/lib/misc/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 std::vector<byte>& salt, + const std::vector<uint8_t>& salt, const BigInt& B, RandomNumberGenerator& rng); @@ -47,7 +47,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 std::vector<byte>& salt, + const std::vector<uint8_t>& salt, const std::string& group_id, const std::string& hash_id); diff --git a/src/lib/misc/srp6/srp6_files.cpp b/src/lib/misc/srp6/srp6_files.cpp index 606c12ad7..0e1569a1c 100644 --- a/src/lib/misc/srp6/srp6_files.cpp +++ b/src/lib/misc/srp6/srp6_files.cpp @@ -28,7 +28,7 @@ SRP6_Authenticator_File::SRP6_Authenticator_File(std::istream& in) std::string username = parts[0]; BigInt v = BigInt::decode(base64_decode(parts[1])); - std::vector<byte> salt = unlock(base64_decode(parts[2])); + std::vector<uint8_t> salt = unlock(base64_decode(parts[2])); BigInt group_id_idx = BigInt::decode(base64_decode(parts[3])); std::string group_id; @@ -48,7 +48,7 @@ SRP6_Authenticator_File::SRP6_Authenticator_File(std::istream& in) bool SRP6_Authenticator_File::lookup_user(const std::string& username, BigInt& v, - std::vector<byte>& salt, + std::vector<uint8_t>& salt, std::string& group_id) const { std::map<std::string, SRP6_Data>::const_iterator i = m_entries.find(username); diff --git a/src/lib/misc/srp6/srp6_files.h b/src/lib/misc/srp6/srp6_files.h index 8c899aad6..124bfc86a 100644 --- a/src/lib/misc/srp6/srp6_files.h +++ b/src/lib/misc/srp6/srp6_files.h @@ -37,7 +37,7 @@ class BOTAN_DLL SRP6_Authenticator_File */ bool lookup_user(const std::string& username, BigInt& v, - std::vector<byte>& salt, + std::vector<uint8_t>& salt, std::string& group_id) const; private: struct SRP6_Data @@ -45,7 +45,7 @@ class BOTAN_DLL SRP6_Authenticator_File SRP6_Data() {} SRP6_Data(const BigInt& v_, - const std::vector<byte>& salt_, + const std::vector<uint8_t>& salt_, const std::string& group_id_) : v(v_), salt(salt_), group_id(group_id_) {} @@ -53,7 +53,7 @@ class BOTAN_DLL SRP6_Authenticator_File BigInt v; // public member variable: - std::vector<byte> salt; + std::vector<uint8_t> salt; // public member variable: std::string group_id; |