Botan
1.11.15
|
00001 /* 00002 * OpenPGP Codec 00003 * (C) 1999-2007 Jack Lloyd 00004 * 00005 * Botan is released under the Simplified BSD License (see license.txt) 00006 */ 00007 00008 #ifndef BOTAN_OPENPGP_CODEC_H__ 00009 #define BOTAN_OPENPGP_CODEC_H__ 00010 00011 #include <botan/data_src.h> 00012 #include <string> 00013 #include <map> 00014 00015 namespace Botan { 00016 00017 /** 00018 * @param input the input data 00019 * @param length length of input in bytes 00020 * @param label the human-readable label 00021 * @param headers a set of key/value pairs included in the header 00022 */ 00023 BOTAN_DLL std::string PGP_encode( 00024 const byte input[], 00025 size_t length, 00026 const std::string& label, 00027 const std::map<std::string, std::string>& headers); 00028 00029 /** 00030 * @param input the input data 00031 * @param length length of input in bytes 00032 * @param label the human-readable label 00033 */ 00034 BOTAN_DLL std::string PGP_encode( 00035 const byte input[], 00036 size_t length, 00037 const std::string& label); 00038 00039 /** 00040 * @param source the input source 00041 * @param label is set to the human-readable label 00042 * @param headers is set to any headers 00043 * @return decoded output as raw binary 00044 */ 00045 BOTAN_DLL secure_vector<byte> PGP_decode( 00046 DataSource& source, 00047 std::string& label, 00048 std::map<std::string, std::string>& headers); 00049 00050 /** 00051 * @param source the input source 00052 * @param label is set to the human-readable label 00053 * @return decoded output as raw binary 00054 */ 00055 BOTAN_DLL secure_vector<byte> PGP_decode( 00056 DataSource& source, 00057 std::string& label); 00058 00059 } 00060 00061 #endif