Botan 3.0.0-alpha0
Crypto and TLS for C&
Namespaces | Macros | Functions
commoncrypto_hash.cpp File Reference
#include <botan/internal/commoncrypto.h>
#include <botan/hash.h>
#include <unordered_map>
#include <CommonCrypto/CommonCrypto.h>

Go to the source code of this file.

Namespaces

namespace  Botan
 

Macros

#define MAKE_COMMONCRYPTO_HASH_1(id)    MAKE_COMMONCRYPTO_HASH_2(#id, id)
 
#define MAKE_COMMONCRYPTO_HASH_2(name, id)    MAKE_COMMONCRYPTO_HASH_3(name, id, id)
 
#define MAKE_COMMONCRYPTO_HASH_3(name, hash, ctx)
 

Functions

std::unique_ptr< HashFunction > Botan::make_commoncrypto_hash (const std::string &name)
 

Macro Definition Documentation

◆ MAKE_COMMONCRYPTO_HASH_1

#define MAKE_COMMONCRYPTO_HASH_1 (   id)     MAKE_COMMONCRYPTO_HASH_2(#id, id)

◆ MAKE_COMMONCRYPTO_HASH_2

#define MAKE_COMMONCRYPTO_HASH_2 (   name,
  id 
)     MAKE_COMMONCRYPTO_HASH_3(name, id, id)

◆ MAKE_COMMONCRYPTO_HASH_3

#define MAKE_COMMONCRYPTO_HASH_3 (   name,
  hash,
  ctx 
)
Value:
std::unique_ptr<HashFunction>( \
new CommonCrypto_HashFunction<CC_ ## ctx ## _CTX >({ \
name, \
CC_ ## hash ## _DIGEST_LENGTH, \
CC_ ## hash ## _BLOCK_BYTES, \
CC_ ## hash ## _Init, \
CC_ ## hash ## _Update, \
CC_ ## hash ## _Final \
}));
MechanismType hash

Variable Documentation

◆ blockSize

size_t blockSize

Definition at line 26 of file commoncrypto_hash.cpp.

◆ digestLength

size_t digestLength

Definition at line 25 of file commoncrypto_hash.cpp.

◆ final

int(* final) (unsigned char *, CTX *) ( unsigned char *  ,
CTX *   
)

Definition at line 29 of file commoncrypto_hash.cpp.

Referenced by Botan::generate_dsa_primes().

◆ init

int(* init) (CTX *) ( CTX *  )

Definition at line 27 of file commoncrypto_hash.cpp.

Referenced by Botan::FE_25519::FE_25519().

◆ name

std::string name

◆ update

int(* update) (CTX *, const void *, CC_LONG len) ( CTX *  ,
const void *  ,
CC_LONG  len 
)