BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
fc::sha256 Class Reference

#include <sha256.hpp>

Classes

class  encoder
 

Public Member Functions

 sha256 ()
 
 sha256 (const string &hex_str)
 
 sha256 (const char *data, size_t size)
 
string str () const
 
 operator string () const
 
char * data () const
 

Static Public Member Functions

static constexpr size_t data_size ()
 
static sha256 hash (const char *d, uint32_t dlen)
 
static sha256 hash (const string &)
 
static sha256 hash (const sha256 &)
 
template<typename T >
static sha256 hash (const T &t)
 

Public Attributes

boost::endian::little_uint64_buf_t _hash [4]
 

Friends

template<typename T >
T & operator<< (T &ds, const sha256 &ep)
 
template<typename T >
T & operator>> (T &ds, sha256 &ep)
 
sha256 operator<< (const sha256 &h1, uint32_t i)
 
sha256 operator>> (const sha256 &h1, uint32_t i)
 
bool operator== (const sha256 &h1, const sha256 &h2)
 
bool operator!= (const sha256 &h1, const sha256 &h2)
 
sha256 operator^ (const sha256 &h1, const sha256 &h2)
 
bool operator>= (const sha256 &h1, const sha256 &h2)
 
bool operator> (const sha256 &h1, const sha256 &h2)
 
bool operator< (const sha256 &h1, const sha256 &h2)
 

Detailed Description

Definition at line 10 of file sha256.hpp.

Constructor & Destructor Documentation

◆ sha256() [1/3]

fc::sha256::sha256 ( )

Definition at line 14 of file sha256.cpp.

◆ sha256() [2/3]

fc::sha256::sha256 ( const string &  hex_str)
explicit

Definition at line 20 of file sha256.cpp.

◆ sha256() [3/3]

fc::sha256::sha256 ( const char *  data,
size_t  size 
)
explicit

Definition at line 15 of file sha256.cpp.

Member Function Documentation

◆ data()

char * fc::sha256::data ( ) const

Definition at line 29 of file sha256.cpp.

◆ data_size()

static constexpr size_t fc::sha256::data_size ( )
inlinestaticconstexpr

Definition at line 21 of file sha256.hpp.

◆ hash() [1/4]

sha256 fc::sha256::hash ( const char *  d,
uint32_t  dlen 
)
static

Definition at line 41 of file sha256.cpp.

◆ hash() [2/4]

sha256 fc::sha256::hash ( const sha256 s)
static

Definition at line 51 of file sha256.cpp.

◆ hash() [3/4]

sha256 fc::sha256::hash ( const string &  s)
static

Definition at line 47 of file sha256.cpp.

◆ hash() [4/4]

template<typename T >
static sha256 fc::sha256::hash ( const T &  t)
inlinestatic

Definition at line 28 of file sha256.hpp.

◆ operator string()

fc::sha256::operator string ( ) const

Definition at line 27 of file sha256.cpp.

◆ str()

string fc::sha256::str ( ) const

Definition at line 24 of file sha256.cpp.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const sha256 h1,
const sha256 h2 
)
friend

Definition at line 95 of file sha256.cpp.

◆ operator<

bool operator< ( const sha256 h1,
const sha256 h2 
)
friend

Definition at line 92 of file sha256.cpp.

◆ operator<< [1/2]

sha256 operator<< ( const sha256 h1,
uint32_t  i 
)
friend

Definition at line 68 of file sha256.cpp.

◆ operator<< [2/2]

template<typename T >
T& operator<< ( T &  ds,
const sha256 ep 
)
friend

Definition at line 52 of file sha256.hpp.

◆ operator==

bool operator== ( const sha256 h1,
const sha256 h2 
)
friend

Definition at line 98 of file sha256.cpp.

◆ operator>

bool operator> ( const sha256 h1,
const sha256 h2 
)
friend

Definition at line 89 of file sha256.cpp.

◆ operator>=

bool operator>= ( const sha256 h1,
const sha256 h2 
)
friend

Definition at line 86 of file sha256.cpp.

◆ operator>> [1/2]

sha256 operator>> ( const sha256 h1,
uint32_t  i 
)
friend

Definition at line 73 of file sha256.cpp.

◆ operator>> [2/2]

template<typename T >
T& operator>> ( T &  ds,
sha256 ep 
)
friend

Definition at line 58 of file sha256.hpp.

◆ operator^

sha256 operator^ ( const sha256 h1,
const sha256 h2 
)
friend

Definition at line 78 of file sha256.cpp.

Member Data Documentation

◆ _hash

boost::endian::little_uint64_buf_t fc::sha256::_hash[4]

Definition at line 71 of file sha256.hpp.


The documentation for this class was generated from the following files: