Bitcoin
Namespaces | Typedefs | Functions | Variables
sha256.cpp File Reference
#include <crypto/sha256.h>
#include <crypto/common.h>
#include <assert.h>
#include <string.h>
#include <atomic>

Namespaces

 sha256d64_sse41
 
 sha256d64_avx2
 
 sha256d64_shani
 
 sha256_shani
 
 anonymous_namespace{sha256.cpp}
 
 anonymous_namespace{sha256.cpp}::sha256
 Internal SHA-256 implementation.
 

Typedefs

typedef void(* anonymous_namespace{sha256.cpp}::TransformType) (uint32_t *, const unsigned char *, size_t)
 
typedef void(* anonymous_namespace{sha256.cpp}::TransformD64Type) (unsigned char *, const unsigned char *)
 

Functions

void sha256d64_sse41::Transform_4way (unsigned char *out, const unsigned char *in)
 
void sha256d64_avx2::Transform_8way (unsigned char *out, const unsigned char *in)
 
void sha256d64_shani::Transform_2way (unsigned char *out, const unsigned char *in)
 
void sha256_shani::Transform (uint32_t *s, const unsigned char *chunk, size_t blocks)
 
uint32_t anonymous_namespace{sha256.cpp}::sha256::Ch (uint32_t x, uint32_t y, uint32_t z)
 
uint32_t anonymous_namespace{sha256.cpp}::sha256::Maj (uint32_t x, uint32_t y, uint32_t z)
 
uint32_t anonymous_namespace{sha256.cpp}::sha256::Sigma0 (uint32_t x)
 
uint32_t anonymous_namespace{sha256.cpp}::sha256::Sigma1 (uint32_t x)
 
uint32_t anonymous_namespace{sha256.cpp}::sha256::sigma0 (uint32_t x)
 
uint32_t anonymous_namespace{sha256.cpp}::sha256::sigma1 (uint32_t x)
 
void anonymous_namespace{sha256.cpp}::sha256::Round (uint32_t a, uint32_t b, uint32_t c, uint32_t &d, uint32_t e, uint32_t f, uint32_t g, uint32_t &h, uint32_t k)
 
void anonymous_namespace{sha256.cpp}::sha256::Initialize (uint32_t *s)
 
void anonymous_namespace{sha256.cpp}::sha256::Transform (uint32_t *s, const unsigned char *chunk, size_t blocks)
 
void anonymous_namespace{sha256.cpp}::sha256::TransformD64 (unsigned char *out, const unsigned char *in)
 
template<TransformType tr>
void anonymous_namespace{sha256.cpp}::TransformD64Wrapper (unsigned char *out, const unsigned char *in)
 
bool anonymous_namespace{sha256.cpp}::SelfTest ()
 
std::string SHA256AutoDetect ()
 
void SHA256D64 (unsigned char *out, const unsigned char *in, size_t blocks)
 

Variables

TransformType anonymous_namespace{sha256.cpp}::Transform = sha256::Transform
 
TransformD64Type anonymous_namespace{sha256.cpp}::TransformD64 = sha256::TransformD64
 
TransformD64Type anonymous_namespace{sha256.cpp}::TransformD64_2way = nullptr
 
TransformD64Type anonymous_namespace{sha256.cpp}::TransformD64_4way = nullptr
 
TransformD64Type anonymous_namespace{sha256.cpp}::TransformD64_8way = nullptr
 

Function Documentation

◆ SHA256AutoDetect()

std::string SHA256AutoDetect ( )

Autodetect the best available SHA256 implementation. Returns the name of the implementation.

◆ SHA256D64()

void SHA256D64 ( unsigned char *  output,
const unsigned char *  input,
size_t  blocks 
)

Compute multiple double-SHA256's of 64-byte blobs. output: pointer to a blocks*32 byte output buffer input: pointer to a blocks*64 byte input buffer blocks: the number of hashes to compute.