blob: 3dbb894ba45c44dd28c46e7d0b15e0c046c82646 (
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
|
/*
* Cryptobox Message Routines
* (C) 2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_CRYPTOBOX_H__
#define BOTAN_CRYPTOBOX_H__
#include <string>
#include <botan/rng.h>
namespace Botan {
/**
* Encrypt a message
* @param input the input data
* @param input_len the length of input in bytes
* @param passphrase the passphrase used to encrypt the message
* @param rng a ref to a random number generator, such as AutoSeeded_RNG
*/
BOTAN_DLL std::string cryptobox_encrypt(const byte input[], u32bit input_len,
const std::string& passphrase,
RandomNumberGenerator& rng);
/**
* Decrypt a message encrypted with CryptoBox::encrypt
* @param input the input data
* @param input_len the length of input in bytes
* @param passphrase the passphrase used to encrypt the message
*/
BOTAN_DLL std::string cryptobox_decrypt(const byte input[], u32bit input_len,
const std::string& passphrase);
}
#endif
|