aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ecc_key/ecc_key.cpp
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/ecc_key/ecc_key.cpp
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/ecc_key/ecc_key.cpp')
-rw-r--r--src/lib/pubkey/ecc_key/ecc_key.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/pubkey/ecc_key/ecc_key.cpp b/src/lib/pubkey/ecc_key/ecc_key.cpp
index 00ddddda1..cb0af42eb 100644
--- a/src/lib/pubkey/ecc_key/ecc_key.cpp
+++ b/src/lib/pubkey/ecc_key/ecc_key.cpp
@@ -38,7 +38,7 @@ EC_PublicKey::EC_PublicKey(const EC_Group& dom_par,
}
EC_PublicKey::EC_PublicKey(const AlgorithmIdentifier& alg_id,
- const std::vector<byte>& key_bits) :
+ const std::vector<uint8_t>& key_bits) :
m_domain_params{EC_Group(alg_id.parameters)},
m_public_key{OS2ECP(key_bits, domain().get_curve())},
m_domain_encoding{EC_DOMPAR_ENC_EXPLICIT}
@@ -55,7 +55,7 @@ AlgorithmIdentifier EC_PublicKey::algorithm_identifier() const
return AlgorithmIdentifier(get_oid(), DER_domain());
}
-std::vector<byte> EC_PublicKey::public_key_bits() const
+std::vector<uint8_t> EC_PublicKey::public_key_bits() const
{
return unlock(EC2OSP(public_point(), PointGFp::COMPRESSED));
}
@@ -110,7 +110,7 @@ EC_PrivateKey::EC_PrivateKey(RandomNumberGenerator& rng,
"Generated public key point was on the curve");
}
-secure_vector<byte> EC_PrivateKey::private_key_bits() const
+secure_vector<uint8_t> EC_PrivateKey::private_key_bits() const
{
return DER_Encoder()
.start_cons(SEQUENCE)
@@ -122,14 +122,14 @@ secure_vector<byte> EC_PrivateKey::private_key_bits() const
}
EC_PrivateKey::EC_PrivateKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits,
+ const secure_vector<uint8_t>& key_bits,
bool with_modular_inverse)
{
m_domain_params = EC_Group(alg_id.parameters);
m_domain_encoding = EC_DOMPAR_ENC_EXPLICIT;
OID key_parameters;
- secure_vector<byte> public_key_bits;
+ secure_vector<uint8_t> public_key_bits;
BER_Decoder(key_bits)
.start_cons(SEQUENCE)