Botan
3.7.1
Crypto and TLS for C&
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
c
d
f
i
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
f
h
i
m
n
o
p
r
s
t
u
v
w
Enumerations
b
c
d
e
k
m
n
o
p
s
t
x
Enumerator
_
a
b
c
d
e
f
h
k
l
m
n
p
q
r
s
t
u
w
x
Related Symbols
b
c
d
e
f
k
o
p
s
t
x
Files
File List
File Members
All
_
a
b
c
d
e
f
i
k
m
n
o
p
q
s
t
u
w
x
y
z
Functions
b
c
Variables
Typedefs
b
c
e
p
t
Enumerations
Enumerator
b
c
d
e
k
n
Macros
_
a
b
c
f
m
n
q
s
t
w
src
lib
utils
types.h
Go to the documentation of this file.
1
/*
2
* Low Level Types
3
* (C) 1999-2007 Jack Lloyd
4
* (C) 2015 Simon Warta (Kullo GmbH)
5
* (C) 2016 René Korthaus, Rohde & Schwarz Cybersecurity
6
*
7
* Botan is released under the Simplified BSD License (see license.txt)
8
*/
9
10
#ifndef BOTAN_TYPES_H_
11
#define BOTAN_TYPES_H_
12
13
#include <botan/api.h>
// IWYU pragma: export
14
#include <botan/build.h>
// IWYU pragma: export
15
#include <cstddef>
// IWYU pragma: export
16
#include <cstdint>
// IWYU pragma: export
17
#include <memory>
// IWYU pragma: export
18
19
/**
20
* MSVC does define __cplusplus but pins it at 199711L, because "legacy".
21
* Note: There is a compiler switch to enable standard behavior (/Zc:__cplusplus),
22
* but we can't control that in downstream applications.
23
*
24
* See: https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus
25
*/
26
#if defined(_MSVC_LANG)
27
#define BOTAN_CPLUSPLUS _MSVC_LANG
28
#else
29
#define BOTAN_CPLUSPLUS __cplusplus
30
#endif
31
32
#if BOTAN_CPLUSPLUS < 202002L
33
#error "Botan 3.x requires at least C++20"
34
#endif
35
36
namespace
Botan
{
37
38
/**
39
* @mainpage Botan Crypto Library API Reference
40
*
41
* <dl>
42
* <dt>Abstract Base Classes<dd>
43
* BlockCipher, HashFunction, KDF, MessageAuthenticationCode, RandomNumberGenerator,
44
* StreamCipher, SymmetricAlgorithm, AEAD_Mode, Cipher_Mode, XOF
45
* <dt>Public Key Interface Classes<dd>
46
* PK_Key_Agreement, PK_Signer, PK_Verifier, PK_Encryptor, PK_Decryptor, PK_KEM_Encryptor, PK_KEM_Decryptor
47
* <dt>Authenticated Encryption Modes<dd>
48
* @ref CCM_Mode "CCM", @ref ChaCha20Poly1305_Mode "ChaCha20Poly1305", @ref EAX_Mode "EAX",
49
* @ref GCM_Mode "GCM", @ref OCB_Mode "OCB", @ref SIV_Mode "SIV"
50
* <dt>Block Ciphers<dd>
51
* @ref aria.h "ARIA", @ref aes.h "AES", @ref Blowfish, @ref camellia.h "Camellia", @ref Cascade_Cipher "Cascade",
52
* @ref CAST_128 "CAST-128", @ref CAST_128 DES, @ref TripleDES "3DES",
53
* @ref GOST_28147_89 "GOST 28147-89", IDEA, Kuznyechik, Lion, Noekeon, SEED, Serpent, SHACAL2, SM4,
54
* @ref Threefish_512 "Threefish", Twofish
55
* <dt>Stream Ciphers<dd>
56
* ChaCha, @ref CTR_BE "CTR", OFB, RC4, Salsa20
57
* <dt>Hash Functions<dd>
58
* BLAKE2b, @ref GOST_34_11 "GOST 34.11", @ref Keccak_1600 "Keccak", MD4, MD5, @ref RIPEMD_160 "RIPEMD-160",
59
* @ref SHA_1 "SHA-1", @ref SHA_224 "SHA-224", @ref SHA_256 "SHA-256", @ref SHA_384 "SHA-384",
60
* @ref SHA_512 "SHA-512", @ref Skein_512 "Skein-512", SM3, Streebog, Whirlpool
61
* <dt>Non-Cryptographic Checksums<dd>
62
* Adler32, CRC24, CRC32
63
* <dt>Message Authentication Codes<dd>
64
* @ref BLAKE2bMAC "BLAKE2b", CMAC, HMAC, KMAC, Poly1305, SipHash, ANSI_X919_MAC
65
* <dt>Random Number Generators<dd>
66
* AutoSeeded_RNG, HMAC_DRBG, Processor_RNG, System_RNG
67
* <dt>Key Derivation<dd>
68
* HKDF, @ref KDF1 "KDF1 (IEEE 1363)", @ref KDF1_18033 "KDF1 (ISO 18033-2)", @ref KDF2 "KDF2 (IEEE 1363)",
69
* @ref sp800_108.h "SP800-108", @ref SP800_56C "SP800-56C", @ref PKCS5_PBKDF2 "PBKDF2 (PKCS#5)"
70
* <dt>Password Hashing<dd>
71
* @ref argon2.h "Argon2", @ref scrypt.h "scrypt", @ref bcrypt.h "bcrypt", @ref passhash9.h "passhash9"
72
* <dt>Public Key Cryptosystems<dd>
73
* @ref dlies.h "DLIES", @ref ecies.h "ECIES", @ref elgamal.h "ElGamal",
74
* @ref rsa.h "RSA", @ref mceliece.h "McEliece", @ref sm2.h "SM2"
75
* <dt>Key Encapsulation Mechanisms<dd>
76
* @ref cmce.h "Classic McEliece", @ref frodokem.h "FrodoKEM", @ref kyber.h "ML-KEM/Kyber", @ref rsa.h "RSA"
77
* <dt>Public Key Signature Schemes<dd>
78
* @ref dsa.h "DSA", @ref dilithium.h "ML-DSA/Dilithium", @ref ecdsa.h "ECDSA", @ref ecgdsa.h "ECGDSA",
79
* @ref eckcdsa.h "ECKCDSA", @ref gost_3410.h "GOST 34.10-2001", @ref hss_lms.h "HSS/LMS", @ref sm2.h "SM2",
80
@ref sphincsplus.h "SLH-DSA/SPHINCS+", @ref xmss.h "XMSS"
81
* <dt>Key Agreement<dd>
82
* @ref dh.h "DH", @ref ecdh.h "ECDH"
83
* <dt>Compression<dd>
84
* @ref bzip2.h "bzip2", @ref lzma.h "lzma", @ref zlib.h "zlib"
85
* <dt>TLS<dd>
86
* TLS::Client, TLS::Server, TLS::Policy, TLS::Protocol_Version, TLS::Callbacks, TLS::Ciphersuite,
87
* TLS::Session, TLS::Session_Summary, TLS::Session_Manager, Credentials_Manager
88
* <dt>X.509<dd>
89
* X509_Certificate, X509_CRL, X509_CA, Certificate_Extension, PKCS10_Request, X509_Cert_Options,
90
* Certificate_Store, Certificate_Store_In_SQL, Certificate_Store_In_SQLite
91
* <dt>eXtendable Output Functions<dd>
92
* @ref SHAKE_XOF "SHAKE"
93
* </dl>
94
*/
95
96
using
std::int32_t;
97
using
std::int64_t;
98
using
std::size_t;
99
using
std::uint16_t;
100
using
std::uint32_t;
101
using
std::uint64_t;
102
using
std::uint8_t;
103
104
#if !defined(BOTAN_IS_BEING_BUILT)
105
/*
106
* These typedefs are no longer used within the library headers
107
* or code. They are kept only for compatibility with software
108
* written against older versions.
109
*/
110
using
byte
= std::uint8_t;
111
using
u16bit
= std::uint16_t;
112
using
u32bit
= std::uint32_t;
113
using
u64bit
= std::uint64_t;
114
using
s32bit
= std::int32_t;
115
#endif
116
117
#if(BOTAN_MP_WORD_BITS == 32)
118
typedef
uint32_t word;
119
#elif(BOTAN_MP_WORD_BITS == 64)
120
typedef
uint64_t word;
121
#else
122
#error BOTAN_MP_WORD_BITS must be 32 or 64
123
#endif
124
125
#if defined(__SIZEOF_INT128__) && defined(BOTAN_TARGET_CPU_HAS_NATIVE_64BIT)
126
#define BOTAN_TARGET_HAS_NATIVE_UINT128
127
128
// GCC complains if this isn't marked with __extension__
129
__extension__
typedef
unsigned
__int128 uint128_t;
130
#endif
131
132
/*
133
* Should this assert fail on your system please contact the developers
134
* for assistance in porting.
135
*/
136
static_assert
(
sizeof
(std::size_t) == 8 ||
sizeof
(std::size_t) == 4,
"This platform has an unexpected size for size_t"
);
137
138
}
// namespace Botan
139
140
#endif
Botan
Definition
alg_id.cpp:13
Botan::s32bit
std::int32_t s32bit
Definition
types.h:114
Botan::u32bit
std::uint32_t u32bit
Definition
types.h:112
Botan::u16bit
std::uint16_t u16bit
Definition
types.h:111
Botan::byte
std::uint8_t byte
Definition
types.h:110
Botan::u64bit
std::uint64_t u64bit
Definition
types.h:113
Generated by
1.12.0