diff options
Diffstat (limited to 'src/lib/asn1/der_enc.h')
-rw-r--r-- | src/lib/asn1/der_enc.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/lib/asn1/der_enc.h b/src/lib/asn1/der_enc.h index 78cb4c38d..22a8741c6 100644 --- a/src/lib/asn1/der_enc.h +++ b/src/lib/asn1/der_enc.h @@ -22,29 +22,29 @@ class ASN1_Object; class BOTAN_DLL DER_Encoder { public: - secure_vector<byte> get_contents(); + secure_vector<uint8_t> get_contents(); - std::vector<byte> get_contents_unlocked() + std::vector<uint8_t> get_contents_unlocked() { return unlock(get_contents()); } DER_Encoder& start_cons(ASN1_Tag type_tag, ASN1_Tag class_tag = UNIVERSAL); DER_Encoder& end_cons(); - DER_Encoder& start_explicit(u16bit type_tag); + DER_Encoder& start_explicit(uint16_t type_tag); DER_Encoder& end_explicit(); - DER_Encoder& raw_bytes(const byte val[], size_t len); - DER_Encoder& raw_bytes(const secure_vector<byte>& val); - DER_Encoder& raw_bytes(const std::vector<byte>& val); + DER_Encoder& raw_bytes(const uint8_t val[], size_t len); + DER_Encoder& raw_bytes(const secure_vector<uint8_t>& val); + DER_Encoder& raw_bytes(const std::vector<uint8_t>& val); DER_Encoder& encode_null(); DER_Encoder& encode(bool b); DER_Encoder& encode(size_t s); DER_Encoder& encode(const BigInt& n); - DER_Encoder& encode(const secure_vector<byte>& v, ASN1_Tag real_type); - DER_Encoder& encode(const std::vector<byte>& v, ASN1_Tag real_type); - DER_Encoder& encode(const byte val[], size_t len, ASN1_Tag real_type); + DER_Encoder& encode(const secure_vector<uint8_t>& v, ASN1_Tag real_type); + DER_Encoder& encode(const std::vector<uint8_t>& v, ASN1_Tag real_type); + DER_Encoder& encode(const uint8_t val[], size_t len, ASN1_Tag real_type); DER_Encoder& encode(bool b, ASN1_Tag type_tag, @@ -58,17 +58,17 @@ class BOTAN_DLL DER_Encoder ASN1_Tag type_tag, ASN1_Tag class_tag = CONTEXT_SPECIFIC); - DER_Encoder& encode(const std::vector<byte>& v, + DER_Encoder& encode(const std::vector<uint8_t>& v, ASN1_Tag real_type, ASN1_Tag type_tag, ASN1_Tag class_tag = CONTEXT_SPECIFIC); - DER_Encoder& encode(const secure_vector<byte>& v, + DER_Encoder& encode(const secure_vector<uint8_t>& v, ASN1_Tag real_type, ASN1_Tag type_tag, ASN1_Tag class_tag = CONTEXT_SPECIFIC); - DER_Encoder& encode(const byte v[], size_t len, + DER_Encoder& encode(const uint8_t v[], size_t len, ASN1_Tag real_type, ASN1_Tag type_tag, ASN1_Tag class_tag = CONTEXT_SPECIFIC); @@ -94,16 +94,16 @@ class BOTAN_DLL DER_Encoder DER_Encoder& encode_if(bool pred, const ASN1_Object& obj); DER_Encoder& add_object(ASN1_Tag type_tag, ASN1_Tag class_tag, - const byte rep[], size_t length); + const uint8_t rep[], size_t length); DER_Encoder& add_object(ASN1_Tag type_tag, ASN1_Tag class_tag, - const std::vector<byte>& rep) + const std::vector<uint8_t>& rep) { return add_object(type_tag, class_tag, rep.data(), rep.size()); } DER_Encoder& add_object(ASN1_Tag type_tag, ASN1_Tag class_tag, - const secure_vector<byte>& rep) + const secure_vector<uint8_t>& rep) { return add_object(type_tag, class_tag, rep.data(), rep.size()); } @@ -112,23 +112,23 @@ class BOTAN_DLL DER_Encoder const std::string& str); DER_Encoder& add_object(ASN1_Tag type_tag, ASN1_Tag class_tag, - byte val); + uint8_t val); private: class DER_Sequence { public: ASN1_Tag tag_of() const; - secure_vector<byte> get_contents(); - void add_bytes(const byte[], size_t); + secure_vector<uint8_t> get_contents(); + void add_bytes(const uint8_t[], size_t); DER_Sequence(ASN1_Tag, ASN1_Tag); private: ASN1_Tag m_type_tag, m_class_tag; - secure_vector<byte> m_contents; - std::vector< secure_vector<byte> > m_set_contents; + secure_vector<uint8_t> m_contents; + std::vector< secure_vector<uint8_t> > m_set_contents; }; - secure_vector<byte> m_contents; + secure_vector<uint8_t> m_contents; std::vector<DER_Sequence> m_subsequences; }; |