BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface 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

fc::sha256::sha256 ( )

Definition at line 14 of file sha256.cpp.

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

Definition at line 20 of file sha256.cpp.

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

Definition at line 15 of file sha256.cpp.

Member Function Documentation

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

Definition at line 29 of file sha256.cpp.

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

Definition at line 21 of file sha256.hpp.

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

Definition at line 41 of file sha256.cpp.

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

Definition at line 47 of file sha256.cpp.

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

Definition at line 51 of file sha256.cpp.

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

Definition at line 28 of file sha256.hpp.

fc::sha256::operator string ( ) const

Definition at line 27 of file sha256.cpp.

string fc::sha256::str ( ) const

Definition at line 24 of file sha256.cpp.

Friends And Related Function Documentation

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

Definition at line 95 of file sha256.cpp.

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

Definition at line 92 of file sha256.cpp.

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

Definition at line 52 of file sha256.hpp.

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

Definition at line 68 of file sha256.cpp.

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

Definition at line 98 of file sha256.cpp.

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

Definition at line 89 of file sha256.cpp.

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

Definition at line 86 of file sha256.cpp.

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

Definition at line 58 of file sha256.hpp.

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

Definition at line 73 of file sha256.cpp.

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

Definition at line 78 of file sha256.cpp.

Member Data Documentation

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: