diff options
-rw-r--r-- | include/alg_id.h | 39 | ||||
-rw-r--r-- | include/asn1_obj.h | 23 | ||||
-rw-r--r-- | src/alg_id.cpp (renamed from src/asn1_alg.cpp) | 2 |
3 files changed, 41 insertions, 23 deletions
diff --git a/include/alg_id.h b/include/alg_id.h new file mode 100644 index 000000000..a95781a7a --- /dev/null +++ b/include/alg_id.h @@ -0,0 +1,39 @@ +/************************************************* +* Algorithm Identifier Header File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#ifndef BOTAN_ALGORITHM_IDENTIFIER_H__ +#define BOTAN_ALGORITHM_IDENTIFIER_H__ + +#include <botan/asn1_int.h> +#include <botan/asn1_oid.h> +#include <string> + +namespace Botan { + +/************************************************* +* Algorithm Identifier * +*************************************************/ +class AlgorithmIdentifier : public ASN1_Object + { + public: + enum Encoding_Option { USE_NULL_PARAM }; + + void encode_into(class DER_Encoder&) const; + void decode_from(class BER_Decoder&); + + AlgorithmIdentifier() {} + AlgorithmIdentifier(const OID&, Encoding_Option); + AlgorithmIdentifier(const std::string&, Encoding_Option); + + AlgorithmIdentifier(const OID&, const MemoryRegion<byte>&); + AlgorithmIdentifier(const std::string&, const MemoryRegion<byte>&); + + OID oid; + SecureVector<byte> parameters; + }; + +} + +#endif diff --git a/include/asn1_obj.h b/include/asn1_obj.h index 4397d2fc3..10f58c916 100644 --- a/include/asn1_obj.h +++ b/include/asn1_obj.h @@ -8,34 +8,13 @@ #include <botan/asn1_int.h> #include <botan/asn1_oid.h> +#include <botan/alg_id.h> #include <vector> #include <map> namespace Botan { /************************************************* -* Algorithm Identifier * -*************************************************/ -class AlgorithmIdentifier : public ASN1_Object - { - public: - enum Encoding_Option { USE_NULL_PARAM }; - - void encode_into(class DER_Encoder&) const; - void decode_from(class BER_Decoder&); - - AlgorithmIdentifier() {} - AlgorithmIdentifier(const OID&, Encoding_Option); - AlgorithmIdentifier(const std::string&, Encoding_Option); - - AlgorithmIdentifier(const OID&, const MemoryRegion<byte>&); - AlgorithmIdentifier(const std::string&, const MemoryRegion<byte>&); - - OID oid; - SecureVector<byte> parameters; - }; - -/************************************************* * Attribute * *************************************************/ class Attribute : public ASN1_Object diff --git a/src/asn1_alg.cpp b/src/alg_id.cpp index 7f54b2fa5..9ecdf1793 100644 --- a/src/asn1_alg.cpp +++ b/src/alg_id.cpp @@ -3,7 +3,7 @@ * (C) 1999-2006 The Botan Project * *************************************************/ -#include <botan/asn1_obj.h> +#include <botan/alg_id.h> #include <botan/der_enc.h> #include <botan/ber_dec.h> #include <botan/oids.h> |