aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc/openpgp/openpgp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/misc/openpgp/openpgp.h')
-rw-r--r--src/lib/misc/openpgp/openpgp.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/lib/misc/openpgp/openpgp.h b/src/lib/misc/openpgp/openpgp.h
new file mode 100644
index 000000000..538b31342
--- /dev/null
+++ b/src/lib/misc/openpgp/openpgp.h
@@ -0,0 +1,61 @@
+/*
+* OpenPGP Codec
+* (C) 1999-2007 Jack Lloyd
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+
+#ifndef BOTAN_OPENPGP_CODEC_H__
+#define BOTAN_OPENPGP_CODEC_H__
+
+#include <botan/data_src.h>
+#include <string>
+#include <map>
+
+namespace Botan {
+
+/**
+* @param input the input data
+* @param length length of input in bytes
+* @param label the human-readable label
+* @param headers a set of key/value pairs included in the header
+*/
+BOTAN_DLL std::string PGP_encode(
+ const byte input[],
+ size_t length,
+ const std::string& label,
+ const std::map<std::string, std::string>& headers);
+
+/**
+* @param input the input data
+* @param length length of input in bytes
+* @param label the human-readable label
+*/
+BOTAN_DLL std::string PGP_encode(
+ const byte input[],
+ size_t length,
+ const std::string& label);
+
+/**
+* @param source the input source
+* @param label is set to the human-readable label
+* @param headers is set to any headers
+* @return decoded output as raw binary
+*/
+BOTAN_DLL secure_vector<byte> PGP_decode(
+ DataSource& source,
+ std::string& label,
+ std::map<std::string, std::string>& headers);
+
+/**
+* @param source the input source
+* @param label is set to the human-readable label
+* @return decoded output as raw binary
+*/
+BOTAN_DLL secure_vector<byte> PGP_decode(
+ DataSource& source,
+ std::string& label);
+
+}
+
+#endif