blob: 2f16ee4617f16d6ea9ee2b6aae78691ce3ceeba1 (
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
|
/*
* Cryptobox Message Routines
* (C) 2009,2013 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_CRYPTOBOX_PSK_H__
#define BOTAN_CRYPTOBOX_PSK_H__
#include <string>
#include <botan/rng.h>
#include <botan/symkey.h>
namespace Botan {
/**
* This namespace holds various high-level crypto functions
*/
namespace CryptoBox {
/**
* Encrypt a message using a shared secret key
* @param input the input data
* @param input_len the length of input in bytes
* @param key the key used to encrypt the message
* @param rng a ref to a random number generator, such as AutoSeeded_RNG
*/
BOTAN_DLL std::vector<byte> encrypt(const byte input[], size_t input_len,
const SymmetricKey& key,
RandomNumberGenerator& rng);
/**
* Encrypt a message using a shared secret key
* @param input the input data
* @param input_len the length of input in bytes
* @param key the key used to encrypt the message
* @param rng a ref to a random number generator, such as AutoSeeded_RNG
*/
BOTAN_DLL secure_vector<byte> decrypt(const byte input[], size_t input_len,
const SymmetricKey& key);
}
}
#endif
|