Botan
3.6.1
Crypto and TLS for C&
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/assert.h>
// IWYU pragma: export
14
#include <botan/build.h>
// IWYU pragma: export
15
#include <botan/compiler.h>
// IWYU pragma: export
16
#include <cstddef>
// IWYU pragma: export
17
#include <cstdint>
// IWYU pragma: export
18
#include <memory>
// IWYU pragma: export
19
20
namespace
Botan
{
21
22
/**
23
* @mainpage Botan Crypto Library API Reference
24
*
25
* <dl>
26
* <dt>Abstract Base Classes<dd>
27
* BlockCipher, HashFunction, KDF, MessageAuthenticationCode, RandomNumberGenerator,
28
* StreamCipher, SymmetricAlgorithm, AEAD_Mode, Cipher_Mode, XOF
29
* <dt>Public Key Interface Classes<dd>
30
* PK_Key_Agreement, PK_Signer, PK_Verifier, PK_Encryptor, PK_Decryptor, PK_KEM_Encryptor, PK_KEM_Decryptor
31
* <dt>Authenticated Encryption Modes<dd>
32
* @ref CCM_Mode "CCM", @ref ChaCha20Poly1305_Mode "ChaCha20Poly1305", @ref EAX_Mode "EAX",
33
* @ref GCM_Mode "GCM", @ref OCB_Mode "OCB", @ref SIV_Mode "SIV"
34
* <dt>Block Ciphers<dd>
35
* @ref aria.h "ARIA", @ref aes.h "AES", @ref Blowfish, @ref camellia.h "Camellia", @ref Cascade_Cipher "Cascade",
36
* @ref CAST_128 "CAST-128", @ref CAST_128 DES, @ref TripleDES "3DES",
37
* @ref GOST_28147_89 "GOST 28147-89", IDEA, Kuznyechik, Lion, Noekeon, SEED, Serpent, SHACAL2, SM4,
38
* @ref Threefish_512 "Threefish", Twofish
39
* <dt>Stream Ciphers<dd>
40
* ChaCha, @ref CTR_BE "CTR", OFB, RC4, Salsa20
41
* <dt>Hash Functions<dd>
42
* BLAKE2b, @ref GOST_34_11 "GOST 34.11", @ref Keccak_1600 "Keccak", MD4, MD5, @ref RIPEMD_160 "RIPEMD-160",
43
* @ref SHA_1 "SHA-1", @ref SHA_224 "SHA-224", @ref SHA_256 "SHA-256", @ref SHA_384 "SHA-384",
44
* @ref SHA_512 "SHA-512", @ref Skein_512 "Skein-512", SM3, Streebog, Whirlpool
45
* <dt>Non-Cryptographic Checksums<dd>
46
* Adler32, CRC24, CRC32
47
* <dt>Message Authentication Codes<dd>
48
* @ref BLAKE2bMAC "BLAKE2b", CMAC, HMAC, KMAC, Poly1305, SipHash, ANSI_X919_MAC
49
* <dt>Random Number Generators<dd>
50
* AutoSeeded_RNG, HMAC_DRBG, Processor_RNG, System_RNG
51
* <dt>Key Derivation<dd>
52
* HKDF, @ref KDF1 "KDF1 (IEEE 1363)", @ref KDF1_18033 "KDF1 (ISO 18033-2)", @ref KDF2 "KDF2 (IEEE 1363)",
53
* @ref sp800_108.h "SP800-108", @ref SP800_56C "SP800-56C", @ref PKCS5_PBKDF2 "PBKDF2 (PKCS#5)"
54
* <dt>Password Hashing<dd>
55
* @ref argon2.h "Argon2", @ref scrypt.h "scrypt", @ref bcrypt.h "bcrypt", @ref passhash9.h "passhash9"
56
* <dt>Public Key Cryptosystems<dd>
57
* @ref dlies.h "DLIES", @ref ecies.h "ECIES", @ref elgamal.h "ElGamal",
58
* @ref rsa.h "RSA", @ref mceliece.h "McEliece", @ref sm2.h "SM2"
59
* <dt>Key Encapsulation Mechanisms<dd>
60
* @ref frodokem.h "FrodoKEM", @ref kyber.h "ML-KEM/Kyber", @ref rsa.h "RSA"
61
* <dt>Public Key Signature Schemes<dd>
62
* @ref dsa.h "DSA", @ref dilithium.h "ML-DSA/Dilithium", @ref ecdsa.h "ECDSA", @ref ecgdsa.h "ECGDSA",
63
* @ref eckcdsa.h "ECKCDSA", @ref gost_3410.h "GOST 34.10-2001", @ref hss_lms.h "HSS/LMS", @ref sm2.h "SM2",
64
@ref sphincsplus.h "SLH-DSA/SPHINCS+", @ref xmss.h "XMSS"
65
* <dt>Key Agreement<dd>
66
* @ref dh.h "DH", @ref ecdh.h "ECDH"
67
* <dt>Compression<dd>
68
* @ref bzip2.h "bzip2", @ref lzma.h "lzma", @ref zlib.h "zlib"
69
* <dt>TLS<dd>
70
* TLS::Client, TLS::Server, TLS::Policy, TLS::Protocol_Version, TLS::Callbacks, TLS::Ciphersuite,
71
* TLS::Session, TLS::Session_Summary, TLS::Session_Manager, Credentials_Manager
72
* <dt>X.509<dd>
73
* X509_Certificate, X509_CRL, X509_CA, Certificate_Extension, PKCS10_Request, X509_Cert_Options,
74
* Certificate_Store, Certificate_Store_In_SQL, Certificate_Store_In_SQLite
75
* <dt>eXtendable Output Functions<dd>
76
* @ref SHAKE_XOF "SHAKE"
77
* </dl>
78
*/
79
80
using
std::int32_t;
81
using
std::int64_t;
82
using
std::size_t;
83
using
std::uint16_t;
84
using
std::uint32_t;
85
using
std::uint64_t;
86
using
std::uint8_t;
87
88
#if !defined(BOTAN_IS_BEING_BUILT)
89
/*
90
* These typedefs are no longer used within the library headers
91
* or code. They are kept only for compatability with software
92
* written against older versions.
93
*/
94
using
byte
= std::uint8_t;
95
using
u16bit
= std::uint16_t;
96
using
u32bit
= std::uint32_t;
97
using
u64bit
= std::uint64_t;
98
using
s32bit
= std::int32_t;
99
#endif
100
101
#if(BOTAN_MP_WORD_BITS == 32)
102
typedef
uint32_t word;
103
#elif(BOTAN_MP_WORD_BITS == 64)
104
typedef
uint64_t word;
105
#else
106
#error BOTAN_MP_WORD_BITS must be 32 or 64
107
#endif
108
109
#if defined(__SIZEOF_INT128__) && defined(BOTAN_TARGET_CPU_HAS_NATIVE_64BIT)
110
#define BOTAN_TARGET_HAS_NATIVE_UINT128
111
112
// GCC complains if this isn't marked with __extension__
113
__extension__
typedef
unsigned
__int128 uint128_t;
114
#endif
115
116
/*
117
* Should this assert fail on your system please contact the developers
118
* for assistance in porting.
119
*/
120
static_assert
(
sizeof
(std::size_t) == 8 ||
sizeof
(std::size_t) == 4,
"This platform has an unexpected size for size_t"
);
121
122
}
// namespace Botan
123
124
#endif
Botan
Definition
alg_id.cpp:13
Botan::s32bit
std::int32_t s32bit
Definition
types.h:98
Botan::u32bit
std::uint32_t u32bit
Definition
types.h:96
Botan::u16bit
std::uint16_t u16bit
Definition
types.h:95
Botan::byte
std::uint8_t byte
Definition
types.h:94
Botan::u64bit
std::uint64_t u64bit
Definition
types.h:97
Generated by
1.12.0