Botan 3.4.0
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")
34std::string 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")
44secure_vector<uint8_t> decrypt_bin(const uint8_t input[], size_t input_len, std::string_view passphrase);
45
46/**
47* Decrypt a message encrypted with CryptoBox::encrypt
48* @param input the input data
49* @param passphrase the passphrase used to encrypt the message
50*/
51BOTAN_DEPRECATED("CryptoBox interface is deprecated")
53secure_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")
63std::string decrypt(const uint8_t input[], size_t input_len, std::string_view passphrase);
64
65/**
66* Decrypt a message encrypted with CryptoBox::encrypt
67* @param input the input data
68* @param passphrase the passphrase used to encrypt the message
69*/
70BOTAN_DEPRECATED("CryptoBox interface is deprecated")
72std::string decrypt(std::string_view input, std::string_view passphrase);
73
74} // namespace CryptoBox
75
76} // namespace Botan
77
78#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