BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
4 #include <openssl/sha.h>
20 sha224::operator string()
const {
return str(); }
40 return hash( s.c_str(), s.size() );
44 SHA224_Update( &my->ctx, d, dlen);
48 SHA224_Final((uint8_t*)h.
data(), &my->ctx );
52 SHA224_Init( &my->ctx);
62 for( uint32_t i = 0; i < 7; ++i )
84 to_variant( std::vector<char>( (
const char*)&bi, ((
const char*)&bi) +
sizeof(bi) ), v, max_depth );
88 std::vector<char> ve = v.
as< std::vector<char> >( max_depth );
89 memset( &bi,
char(0),
sizeof(bi) );
91 memcpy( &bi, ve.
data(), std::min<size_t>(ve.size(),
sizeof(bi)) );
95 unsigned int hmac<sha224>::internal_block_size()
const {
return 64; }
friend bool operator>=(const sha224 &h1, const sha224 &h2)
static constexpr size_t data_size()
friend T & operator<<(T &ds, const sha224 &ep)
friend sha224 operator^(const sha224 &h1, const sha224 &h2)
void from_variant(const variant &var, flat_set< T, A... > &vo, uint32_t _max_depth)
std::string to_hex(const char *d, uint32_t s)
friend bool operator<(const sha224 &h1, const sha224 &h2)
T as(uint32_t max_depth) const
friend bool operator>(const sha224 &h1, const sha224 &h2)
void to_variant(const flat_set< T, A... > &var, variant &vo, uint32_t _max_depth)
friend bool operator!=(const sha224 &h1, const sha224 &h2)
friend bool operator==(const sha224 &h1, const sha224 &h2)
void write(const char *d, uint32_t dlen)
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
boost::endian::little_uint32_buf_t _hash[7]
static sha224 hash(const char *d, uint32_t dlen)