summaryrefslogtreecommitdiffstats
path: root/old/botan/build/botan/alg_id.h
diff options
context:
space:
mode:
Diffstat (limited to 'old/botan/build/botan/alg_id.h')
-rw-r--r--old/botan/build/botan/alg_id.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/old/botan/build/botan/alg_id.h b/old/botan/build/botan/alg_id.h
new file mode 100644
index 0000000..4a1ad2f
--- /dev/null
+++ b/old/botan/build/botan/alg_id.h
@@ -0,0 +1,49 @@
+/*
+* Algorithm Identifier
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#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