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/xmss/xmss_signature.h | |
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/xmss/xmss_signature.h')
-rw-r--r-- | src/lib/pubkey/xmss/xmss_signature.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/pubkey/xmss/xmss_signature.h b/src/lib/pubkey/xmss/xmss_signature.h index 662aa8988..cbeb8c514 100644 --- a/src/lib/pubkey/xmss/xmss_signature.h +++ b/src/lib/pubkey/xmss/xmss_signature.h @@ -22,7 +22,7 @@ class BOTAN_DLL XMSS_Signature { public: /** - * Creates a signature from an XMSS signature method and a byte sequence + * Creates a signature from an XMSS signature method and a uint8_t sequence * representing a raw signature. * * @param oid XMSS signature method @@ -30,7 +30,7 @@ class BOTAN_DLL XMSS_Signature * XMSS_Signature::bytes(). **/ XMSS_Signature(XMSS_Parameters::xmss_algorithm_t oid, - const secure_vector<byte>& raw_sig); + const secure_vector<uint8_t>& raw_sig); /** * Creates an XMSS Signature from a leaf index used for signature @@ -41,7 +41,7 @@ class BOTAN_DLL XMSS_Signature * @param tree_sig A tree signature. **/ XMSS_Signature(size_t leaf_idx, - const secure_vector<byte>& randomness, + const secure_vector<uint8_t>& randomness, const XMSS_WOTS_PublicKey::TreeSignature& tree_sig) : m_leaf_idx(leaf_idx), m_randomness(randomness), m_tree_sig(tree_sig) {}; @@ -55,7 +55,7 @@ class BOTAN_DLL XMSS_Signature * @param tree_sig A tree signature. **/ XMSS_Signature(size_t leaf_idx, - secure_vector<byte>&& randomness, + secure_vector<uint8_t>&& randomness, XMSS_WOTS_PublicKey::TreeSignature&& tree_sig) : m_leaf_idx(leaf_idx), m_randomness(std::move(randomness)), m_tree_sig(std::move(tree_sig)) {}; @@ -63,22 +63,22 @@ class BOTAN_DLL XMSS_Signature size_t unused_leaf_index() const { return m_leaf_idx; } void set_unused_leaf_idx(size_t idx) { m_leaf_idx = idx; } - const secure_vector<byte> randomness() const + const secure_vector<uint8_t> randomness() const { return m_randomness; } - secure_vector<byte>& randomness() + secure_vector<uint8_t>& randomness() { return m_randomness; } - void set_randomness(const secure_vector<byte>& randomness) + void set_randomness(const secure_vector<uint8_t>& randomness) { m_randomness = randomness; } - void set_randomness(secure_vector<byte>&& randomness) + void set_randomness(secure_vector<uint8_t>&& randomness) { m_randomness = std::move(randomness); } @@ -115,11 +115,11 @@ class BOTAN_DLL XMSS_Signature * @return serialized signature, a sequence of * (len + h + 1)n bytes. **/ - secure_vector<byte> bytes() const; + secure_vector<uint8_t> bytes() const; private: size_t m_leaf_idx; - secure_vector<byte> m_randomness; + secure_vector<uint8_t> m_randomness; XMSS_WOTS_PublicKey::TreeSignature m_tree_sig; }; |