Botan 3.6.1
Crypto and TLS for C&
cryptobox.h
Go to the documentation of this file.
1/*
2* Cryptobox Message Routines
3* (C) 2009 Jack Lloyd
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_CRYPTOBOX_H_
9#define BOTAN_CRYPTOBOX_H_
10
11#include <botan/symkey.h>
12#include <string>
13
14BOTAN_DEPRECATED_HEADER("cryptobox.h")
15
16namespace Botan {
17
18class RandomNumberGenerator;
19
20/**
21* This namespace holds various high-level crypto functions
22*/
23namespace CryptoBox {
24
25/**
26* Encrypt a message using a passphrase
27* @param input the input data
28* @param input_len the length of input in bytes
29* @param passphrase the passphrase used to encrypt the message
30* @param rng a ref to a random number generator, such as AutoSeeded_RNG
31*/
32BOTAN_DEPRECATED("CryptoBox interface is deprecated")
33BOTAN_PUBLIC_API(2, 0) std::string
34 encrypt(const uint8_t input[], size_t input_len, std::string_view passphrase, RandomNumberGenerator& rng);
35
36/**
37* Decrypt a message encrypted with CryptoBox::encrypt
38* @param input the input data
39* @param input_len the length of input in bytes
40* @param passphrase the passphrase used to encrypt the message
41*/
42BOTAN_DEPRECATED("CryptoBox interface is deprecated")
43BOTAN_PUBLIC_API(2, 3) secure_vector<uint8_t> decrypt_bin(const uint8_t input[],
44 size_t input_len,
45 std::string_view passphrase);
46
47/**
48* Decrypt a message encrypted with CryptoBox::encrypt
49* @param input the input data
50* @param passphrase the passphrase used to encrypt the message
51*/
52BOTAN_DEPRECATED("CryptoBox interface is deprecated")
53BOTAN_PUBLIC_API(2, 3) secure_vector<uint8_t> decrypt_bin(std::string_view input, std::string_view passphrase);
54
55/**
56* Decrypt a message encrypted with CryptoBox::encrypt
57* @param input the input data
58* @param input_len the length of input in bytes
59* @param passphrase the passphrase used to encrypt the message
60*/
61BOTAN_DEPRECATED("CryptoBox interface is deprecated")
62BOTAN_PUBLIC_API(2, 0) std::string decrypt(const uint8_t input[], size_t input_len, std::string_view passphrase);
63
64/**
65* Decrypt a message encrypted with CryptoBox::encrypt
66* @param input the input data
67* @param passphrase the passphrase used to encrypt the message
68*/
69BOTAN_DEPRECATED("CryptoBox interface is deprecated")
70BOTAN_PUBLIC_API(2, 0) std::string decrypt(std::string_view input, std::string_view passphrase);
71
72} // namespace CryptoBox
73
74} // namespace Botan
75
76#endif
#define BOTAN_DEPRECATED_HEADER(hdr)
Definition compiler.h:146
#define BOTAN_PUBLIC_API(maj, min)
Definition compiler.h:31
#define BOTAN_DEPRECATED(msg)
Definition compiler.h:125