aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/dl_group
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_group
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_group')
-rw-r--r--src/lib/pubkey/dl_group/dl_group.cpp8
-rw-r--r--src/lib/pubkey/dl_group/dl_group.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/pubkey/dl_group/dl_group.cpp b/src/lib/pubkey/dl_group/dl_group.cpp
index 40660e62a..0f4985eb9 100644
--- a/src/lib/pubkey/dl_group/dl_group.cpp
+++ b/src/lib/pubkey/dl_group/dl_group.cpp
@@ -83,7 +83,7 @@ DL_Group::DL_Group(RandomNumberGenerator& rng,
* DL_Group Constructor
*/
DL_Group::DL_Group(RandomNumberGenerator& rng,
- const std::vector<byte>& seed,
+ const std::vector<uint8_t>& seed,
size_t pbits, size_t qbits)
{
if(!generate_dsa_primes(rng, m_p, m_q, pbits, qbits, seed))
@@ -193,7 +193,7 @@ const BigInt& DL_Group::get_q() const
/*
* DER encode the parameters
*/
-std::vector<byte> DL_Group::DER_encode(Format format) const
+std::vector<uint8_t> DL_Group::DER_encode(Format format) const
{
init_check();
@@ -238,7 +238,7 @@ std::vector<byte> DL_Group::DER_encode(Format format) const
*/
std::string DL_Group::PEM_encode(Format format) const
{
- const std::vector<byte> encoding = DER_encode(format);
+ const std::vector<uint8_t> encoding = DER_encode(format);
if(format == PKCS_3)
return PEM_Code::encode(encoding, "DH PARAMETERS");
@@ -253,7 +253,7 @@ std::string DL_Group::PEM_encode(Format format) const
/*
* Decode BER encoded parameters
*/
-void DL_Group::BER_decode(const std::vector<byte>& data,
+void DL_Group::BER_decode(const std::vector<uint8_t>& data,
Format format)
{
BigInt new_p, new_q, new_g;
diff --git a/src/lib/pubkey/dl_group/dl_group.h b/src/lib/pubkey/dl_group/dl_group.h
index 8bdd205da..39ad9b954 100644
--- a/src/lib/pubkey/dl_group/dl_group.h
+++ b/src/lib/pubkey/dl_group/dl_group.h
@@ -78,14 +78,14 @@ class BOTAN_DLL DL_Group
* @param format the encoding format
* @return string holding the DER encoded group
*/
- std::vector<byte> DER_encode(Format format) const;
+ std::vector<uint8_t> DER_encode(Format format) const;
/**
* Decode a DER/BER encoded group into this instance.
* @param ber a vector containing the DER/BER encoded group
* @param format the format of the encoded group
*/
- void BER_decode(const std::vector<byte>& ber,
+ void BER_decode(const std::vector<uint8_t>& ber,
Format format);
/**
@@ -134,7 +134,7 @@ class BOTAN_DLL DL_Group
* @param qbits the desired bit size of the prime q.
*/
DL_Group(RandomNumberGenerator& rng,
- const std::vector<byte>& seed,
+ const std::vector<uint8_t>& seed,
size_t pbits = 1024, size_t qbits = 0);
/**