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/pubkey/ec_group/ec_group.cpp | |
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/pubkey/ec_group/ec_group.cpp')
-rw-r--r-- | src/lib/pubkey/ec_group/ec_group.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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"); } |