From f3cb3edb512bdcab498d825886c3366c341b3f78 Mon Sep 17 00:00:00 2001 From: Jack Lloyd <jack@randombit.net> 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/ec_group/ec_group.cpp | 10 +++++----- src/lib/pubkey/ec_group/ec_group.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib/pubkey/ec_group') diff --git a/src/lib/pubkey/ec_group/ec_group.cpp b/src/lib/pubkey/ec_group/ec_group.cpp index c264d7314..a5262fd5e 100644 --- a/src/lib/pubkey/ec_group/ec_group.cpp +++ b/src/lib/pubkey/ec_group/ec_group.cpp @@ -33,7 +33,7 @@ EC_Group::EC_Group(const std::string& str) try { - std::vector<byte> ber = + std::vector<uint8_t> ber = unlock(PEM_Code::decode_check_label(str, "EC PARAMETERS")); *this = EC_Group(ber); @@ -44,7 +44,7 @@ EC_Group::EC_Group(const std::string& str) } } -EC_Group::EC_Group(const std::vector<byte>& ber_data) +EC_Group::EC_Group(const std::vector<uint8_t>& ber_data) { BER_Decoder ber(ber_data); BER_Object obj = ber.get_next_object(); @@ -60,7 +60,7 @@ EC_Group::EC_Group(const std::vector<byte>& ber_data) else if(obj.type_tag == SEQUENCE) { BigInt p, a, b; - std::vector<byte> sv_base_point; + std::vector<uint8_t> sv_base_point; BER_Decoder(ber_data) .start_cons(SEQUENCE) @@ -87,7 +87,7 @@ EC_Group::EC_Group(const std::vector<byte>& ber_data) throw Decoding_Error("Unexpected tag while decoding ECC domain params"); } -std::vector<byte> +std::vector<uint8_t> EC_Group::DER_encode(EC_Group_Encoding form) const { if(form == EC_DOMPAR_ENC_EXPLICIT) @@ -126,7 +126,7 @@ EC_Group::DER_encode(EC_Group_Encoding form) const std::string EC_Group::PEM_encode() const { - const std::vector<byte> der = DER_encode(EC_DOMPAR_ENC_EXPLICIT); + const std::vector<uint8_t> der = DER_encode(EC_DOMPAR_ENC_EXPLICIT); return PEM_Code::encode(der, "EC PARAMETERS"); } diff --git a/src/lib/pubkey/ec_group/ec_group.h b/src/lib/pubkey/ec_group/ec_group.h index a03b97a68..b623a876d 100644 --- a/src/lib/pubkey/ec_group/ec_group.h +++ b/src/lib/pubkey/ec_group/ec_group.h @@ -54,7 +54,7 @@ class BOTAN_DLL EC_Group * Decode a BER encoded ECC domain parameter set * @param ber_encoding the bytes of the BER encoding */ - explicit EC_Group(const std::vector<byte>& ber_encoding); + explicit EC_Group(const std::vector<uint8_t>& ber_encoding); /** * Create an EC domain by OID (or throw if unknown) @@ -74,7 +74,7 @@ class BOTAN_DLL EC_Group * @param form of encoding to use * @returns bytes encododed as DER */ - std::vector<byte> DER_encode(EC_Group_Encoding form) const; + std::vector<uint8_t> DER_encode(EC_Group_Encoding form) const; /** * Return the PEM encoding (always in explicit form) -- cgit v1.2.3