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/ecdsa | |
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/ecdsa')
-rw-r--r-- | src/lib/pubkey/ecdsa/ecdsa.cpp | 14 | ||||
-rw-r--r-- | src/lib/pubkey/ecdsa/ecdsa.h | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/pubkey/ecdsa/ecdsa.cpp b/src/lib/pubkey/ecdsa/ecdsa.cpp index 8a6dd840b..bb65fb138 100644 --- a/src/lib/pubkey/ecdsa/ecdsa.cpp +++ b/src/lib/pubkey/ecdsa/ecdsa.cpp @@ -58,7 +58,7 @@ class ECDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA size_t max_input_bits() const override { return m_order.bits(); } - secure_vector<byte> raw_sign(const byte msg[], size_t msg_len, + secure_vector<uint8_t> raw_sign(const uint8_t msg[], size_t msg_len, RandomNumberGenerator& rng) override; private: @@ -69,8 +69,8 @@ class ECDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA std::string m_emsa; }; -secure_vector<byte> -ECDSA_Signature_Operation::raw_sign(const byte msg[], size_t msg_len, +secure_vector<uint8_t> +ECDSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, RandomNumberGenerator& rng) { const BigInt m(msg, msg_len); @@ -113,8 +113,8 @@ class ECDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA bool with_recovery() const override { return false; } - bool verify(const byte msg[], size_t msg_len, - const byte sig[], size_t sig_len) override; + bool verify(const uint8_t msg[], size_t msg_len, + const uint8_t sig[], size_t sig_len) override; private: const PointGFp& m_base_point; const PointGFp& m_public_point; @@ -123,8 +123,8 @@ class ECDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA Modular_Reducer m_mod_order; }; -bool ECDSA_Verification_Operation::verify(const byte msg[], size_t msg_len, - const byte sig[], size_t sig_len) +bool ECDSA_Verification_Operation::verify(const uint8_t msg[], size_t msg_len, + const uint8_t sig[], size_t sig_len) { if(sig_len != m_order.bytes()*2) return false; diff --git a/src/lib/pubkey/ecdsa/ecdsa.h b/src/lib/pubkey/ecdsa/ecdsa.h index d6e08c42f..21535a2f4 100644 --- a/src/lib/pubkey/ecdsa/ecdsa.h +++ b/src/lib/pubkey/ecdsa/ecdsa.h @@ -36,7 +36,7 @@ class BOTAN_DLL ECDSA_PublicKey : public virtual EC_PublicKey * @param key_bits DER encoded public key bits */ ECDSA_PublicKey(const AlgorithmIdentifier& alg_id, - const std::vector<byte>& key_bits) : + const std::vector<uint8_t>& key_bits) : EC_PublicKey(alg_id, key_bits) {} /** @@ -71,7 +71,7 @@ class BOTAN_DLL ECDSA_PrivateKey : public ECDSA_PublicKey, * @param key_bits PKCS #8 structure */ ECDSA_PrivateKey(const AlgorithmIdentifier& alg_id, - const secure_vector<byte>& key_bits) : + const secure_vector<uint8_t>& key_bits) : EC_PrivateKey(alg_id, key_bits) {} /** |