Botan: src/constructs/cryptobox/cryptobox.h Source File

Botan 1.10.16

cryptobox.h
Go to the documentation of this file.
1 /*
2 * Cryptobox Message Routines
3 * (C) 2009 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_CRYPTOBOX_H__
9 #define BOTAN_CRYPTOBOX_H__
10
11 #include <string>
12 #include <botan/rng.h>
13
14 namespace Botan {
15
16 /**
17 * This namespace holds various high-level crypto functions
18 */
19 namespace CryptoBox {
20
21 /**
22 * Encrypt a message using a passphrase
23 * @param input the input data
24 * @param input_len the length of input in bytes
25 * @param passphrase the passphrase used to encrypt the message
26 * @param rng a ref to a random number generator, such as AutoSeeded_RNG
27 */
28 BOTAN_DLL std::string encrypt(const byte input[], size_t input_len,
29 const std::string& passphrase,
30 RandomNumberGenerator& rng);
31
32 /**
33 * Decrypt a message encrypted with CryptoBox::encrypt
34 * @param input the input data
35 * @param input_len the length of input in bytes
36 * @param passphrase the passphrase used to encrypt the message
37 */
38 BOTAN_DLL std::string decrypt(const byte input[], size_t input_len,
39 const std::string& passphrase);
40
41 /**
42 * Decrypt a message encrypted with CryptoBox::encrypt
43 * @param input the input data
44 * @param passphrase the passphrase used to encrypt the message
45 */
46 BOTAN_DLL std::string decrypt(const std::string& input,
47 const std::string& passphrase);
48
49 }
50
51 }
52
53 #endif
Botan::CryptoBox::decrypt
std::string decrypt(const byte input[], size_t input_len, const std::string &passphrase)
Definition: cryptobox.cpp:99
Botan::byte
unsigned char byte
Definition: types.h:22
Botan
Definition: algo_base.h:14
Botan::CryptoBox::encrypt
std::string encrypt(const byte input[], size_t input_len, const std::string &passphrase, RandomNumberGenerator &rng)
Definition: cryptobox.cpp:43