aboutsummaryrefslogtreecommitdiffstats
path: root/src/asn1/alg_id.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-28 22:14:54 +0000
committerlloyd <[email protected]>2008-09-28 22:14:54 +0000
commit31204986023619c385d378e79a6511bb81ef7b78 (patch)
treece272a6585dc070f750f6875b0450d53145b935d /src/asn1/alg_id.h
parent42c0fe76ab6d9625d0e51c68b8dd187322c991bd (diff)
Move almost all of the ASN.1, BER, and DER codec related code into new
module asn1 Move hex and base64 codecs into new codecs directory. Also move zlib and bzip2 to codecs from compress.
Diffstat (limited to 'src/asn1/alg_id.h')
-rw-r--r--src/asn1/alg_id.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/asn1/alg_id.h b/src/asn1/alg_id.h
new file mode 100644
index 000000000..8187fc070
--- /dev/null
+++ b/src/asn1/alg_id.h
@@ -0,0 +1,47 @@
+/*************************************************
+* Algorithm Identifier Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#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 BOTAN_DLL 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;
+ };
+
+/*************************************************
+* Comparison Operations *
+*************************************************/
+bool BOTAN_DLL operator==(const AlgorithmIdentifier&,
+ const AlgorithmIdentifier&);
+bool BOTAN_DLL operator!=(const AlgorithmIdentifier&,
+ const AlgorithmIdentifier&);
+
+}
+
+#endif