aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/dl_algo
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/pubkey/dl_algo
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (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/pubkey/dl_algo')
-rw-r--r--src/lib/pubkey/dl_algo/dl_algo.cpp8
-rw-r--r--src/lib/pubkey/dl_algo/dl_algo.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/pubkey/dl_algo/dl_algo.cpp b/src/lib/pubkey/dl_algo/dl_algo.cpp
index 8e885d318..ac6637e29 100644
--- a/src/lib/pubkey/dl_algo/dl_algo.cpp
+++ b/src/lib/pubkey/dl_algo/dl_algo.cpp
@@ -29,13 +29,13 @@ AlgorithmIdentifier DL_Scheme_PublicKey::algorithm_identifier() const
m_group.DER_encode(group_format()));
}
-std::vector<byte> DL_Scheme_PublicKey::public_key_bits() const
+std::vector<uint8_t> DL_Scheme_PublicKey::public_key_bits() const
{
return DER_Encoder().encode(m_y).get_contents_unlocked();
}
DL_Scheme_PublicKey::DL_Scheme_PublicKey(const AlgorithmIdentifier& alg_id,
- const std::vector<byte>& key_bits,
+ const std::vector<uint8_t>& key_bits,
DL_Group::Format format)
{
m_group.BER_decode(alg_id.parameters, format);
@@ -43,13 +43,13 @@ DL_Scheme_PublicKey::DL_Scheme_PublicKey(const AlgorithmIdentifier& alg_id,
BER_Decoder(key_bits).decode(m_y);
}
-secure_vector<byte> DL_Scheme_PrivateKey::private_key_bits() const
+secure_vector<uint8_t> DL_Scheme_PrivateKey::private_key_bits() const
{
return DER_Encoder().encode(m_x).get_contents();
}
DL_Scheme_PrivateKey::DL_Scheme_PrivateKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits,
+ const secure_vector<uint8_t>& key_bits,
DL_Group::Format format)
{
m_group.BER_decode(alg_id.parameters, format);
diff --git a/src/lib/pubkey/dl_algo/dl_algo.h b/src/lib/pubkey/dl_algo/dl_algo.h
index 40c4a1fab..044aae2e6 100644
--- a/src/lib/pubkey/dl_algo/dl_algo.h
+++ b/src/lib/pubkey/dl_algo/dl_algo.h
@@ -23,7 +23,7 @@ class BOTAN_DLL DL_Scheme_PublicKey : public virtual Public_Key
AlgorithmIdentifier algorithm_identifier() const override;
- std::vector<byte> public_key_bits() const override;
+ std::vector<uint8_t> public_key_bits() const override;
/**
* Get the DL domain parameters of this key.
@@ -70,7 +70,7 @@ class BOTAN_DLL DL_Scheme_PublicKey : public virtual Public_Key
* @param group_format the underlying groups encoding format
*/
DL_Scheme_PublicKey(const AlgorithmIdentifier& alg_id,
- const std::vector<byte>& key_bits,
+ const std::vector<uint8_t>& key_bits,
DL_Group::Format group_format);
protected:
@@ -102,7 +102,7 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey,
*/
const BigInt& get_x() const { return m_x; }
- secure_vector<byte> private_key_bits() const override;
+ secure_vector<uint8_t> private_key_bits() const override;
/**
* Create a private key.
@@ -111,7 +111,7 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey,
* @param group_format the underlying groups encoding format
*/
DL_Scheme_PrivateKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits,
+ const secure_vector<uint8_t>& key_bits,
DL_Group::Format group_format);
protected: