aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ec_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/ec_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/ec_group')
-rw-r--r--src/lib/pubkey/ec_group/ec_group.cpp10
-rw-r--r--src/lib/pubkey/ec_group/ec_group.h4
2 files changed, 7 insertions, 7 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");
}
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)