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 sha512::operator std::string()
const {
return str(); }
40 return hash( s.c_str(), s.size() );
44 SHA512_Update( &my->ctx, d, dlen);
48 SHA512_Final((uint8_t*)h.
data(), &my->ctx );
52 SHA512_Init( &my->ctx);
90 to_variant( std::vector<char>( (
const char*)&bi, ((
const char*)&bi) +
sizeof(bi) ), v, max_depth );
94 std::vector<char> ve = v.
as< std::vector<char> >( max_depth );
95 memset( &bi,
char(0),
sizeof(bi) );
97 memcpy( &bi, ve.
data(), std::min<size_t>(ve.size(),
sizeof(bi)) );
101 unsigned int hmac<sha512>::internal_block_size()
const {
return 128; }
friend bool operator==(const sha512 &h1, const sha512 &h2)
friend bool operator<(const sha512 &h1, const sha512 &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)
static sha512 hash(const char *d, uint32_t dlen)
friend bool operator!=(const sha512 &h1, const sha512 &h2)
T as(uint32_t max_depth) const
void to_variant(const flat_set< T, A... > &var, variant &vo, uint32_t _max_depth)
friend bool operator>(const sha512 &h1, const sha512 &h2)
friend T & operator<<(T &ds, const sha512 &ep)
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
boost::endian::little_uint64_buf_t _hash[8]
friend bool operator>=(const sha512 &h1, const sha512 &h2)
friend sha512 operator^(const sha512 &h1, const sha512 &h2)
static constexpr size_t data_size()
void write(const char *d, uint32_t dlen)