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/ecgdsa | |
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/ecgdsa')
-rw-r--r-- | src/lib/pubkey/ecgdsa/ecgdsa.cpp | 14 | ||||
-rw-r--r-- | src/lib/pubkey/ecgdsa/ecgdsa.h | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/pubkey/ecgdsa/ecgdsa.cpp b/src/lib/pubkey/ecgdsa/ecgdsa.cpp index 3740c3583..eb979cc1c 100644 --- a/src/lib/pubkey/ecgdsa/ecgdsa.cpp +++ b/src/lib/pubkey/ecgdsa/ecgdsa.cpp @@ -43,7 +43,7 @@ class ECGDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA { } - 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; size_t max_input_bits() const override { return m_order.bits(); } @@ -55,8 +55,8 @@ class ECGDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA Modular_Reducer m_mod_order; }; -secure_vector<byte> -ECGDSA_Signature_Operation::raw_sign(const byte msg[], size_t msg_len, +secure_vector<uint8_t> +ECGDSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, RandomNumberGenerator& rng) { const BigInt m(msg, msg_len); @@ -95,8 +95,8 @@ class ECGDSA_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; @@ -105,8 +105,8 @@ class ECGDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA Modular_Reducer m_mod_order; }; -bool ECGDSA_Verification_Operation::verify(const byte msg[], size_t msg_len, - const byte sig[], size_t sig_len) +bool ECGDSA_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/ecgdsa/ecgdsa.h b/src/lib/pubkey/ecgdsa/ecgdsa.h index 5e0040fca..1d079bf38 100644 --- a/src/lib/pubkey/ecgdsa/ecgdsa.h +++ b/src/lib/pubkey/ecgdsa/ecgdsa.h @@ -34,7 +34,7 @@ class BOTAN_DLL ECGDSA_PublicKey : public virtual EC_PublicKey * @param key_bits DER encoded public key bits */ ECGDSA_PublicKey(const AlgorithmIdentifier& alg_id, - const std::vector<byte>& key_bits) : + const std::vector<uint8_t>& key_bits) : EC_PublicKey(alg_id, key_bits) {} /** @@ -69,7 +69,7 @@ class BOTAN_DLL ECGDSA_PrivateKey : public ECGDSA_PublicKey, * @param key_bits PKCS #8 structure */ ECGDSA_PrivateKey(const AlgorithmIdentifier& alg_id, - const secure_vector<byte>& key_bits) : + const secure_vector<uint8_t>& key_bits) : EC_PrivateKey(alg_id, key_bits, true) {} /** |