From f3cb3edb512bdcab498d825886c3366c341b3f78 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 11 Dec 2016 15:28:38 -0500 Subject: 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. --- src/lib/pubkey/dl_group/dl_group.cpp | 8 ++++---- src/lib/pubkey/dl_group/dl_group.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib/pubkey/dl_group') 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& seed, + const std::vector& 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 DL_Group::DER_encode(Format format) const +std::vector DL_Group::DER_encode(Format format) const { init_check(); @@ -238,7 +238,7 @@ std::vector DL_Group::DER_encode(Format format) const */ std::string DL_Group::PEM_encode(Format format) const { - const std::vector encoding = DER_encode(format); + const std::vector 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& data, +void DL_Group::BER_decode(const std::vector& 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 DER_encode(Format format) const; + std::vector 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& ber, + void BER_decode(const std::vector& 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& seed, + const std::vector& seed, size_t pbits = 1024, size_t qbits = 0); /** -- cgit v1.2.3