Bitcoin Core  27.99.0
P2P Digital Currency
Classes | Namespaces | Enumerations | Functions
sha256.h File Reference
#include <cstdlib>
#include <stdint.h>
#include <string>
Include dependency graph for sha256.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CSHA256
 A hasher class for SHA-256. More...
 

Namespaces

 sha256_implementation
 

Enumerations

enum  sha256_implementation::UseImplementation : uint8_t {
  sha256_implementation::STANDARD = 0 , sha256_implementation::USE_SSE4 = 1 << 0 , sha256_implementation::USE_AVX2 = 1 << 1 , sha256_implementation::USE_SHANI = 1 << 2 ,
  sha256_implementation::USE_SSE4_AND_AVX2 = USE_SSE4 | USE_AVX2 , sha256_implementation::USE_SSE4_AND_SHANI = USE_SSE4 | USE_SHANI , sha256_implementation::USE_ALL = USE_SSE4 | USE_AVX2 | USE_SHANI
}
 

Functions

std::string SHA256AutoDetect (sha256_implementation::UseImplementation use_implementation=sha256_implementation::USE_ALL)
 Autodetect the best available SHA256 implementation. More...
 
void SHA256D64 (unsigned char *output, const unsigned char *input, size_t blocks)
 Compute multiple double-SHA256's of 64-byte blobs. More...
 

Function Documentation

◆ SHA256AutoDetect()

std::string SHA256AutoDetect ( sha256_implementation::UseImplementation  use_implementation = sha256_implementation::USE_ALL)

Autodetect the best available SHA256 implementation.

Returns the name of the implementation.

Definition at line 586 of file sha256.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

Definition at line 750 of file sha256.cpp.

Here is the caller graph for this function: