blob: 538b31342a3440979be6353a607cf086cb141886 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
|