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