BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
3 #include <openssl/sha.h>
4 #include <openssl/ripemd.h>
24 ripemd160::operator string()
const {
return str(); }
33 memset( (
char*)&
ctx, 0,
sizeof(
ctx) );
45 return hash( (
const char*)&h,
sizeof(h) );
49 return hash( (
const char*)&h,
sizeof(h) );
57 return hash( s.c_str(), s.size() );
61 RIPEMD160_Update( &my->ctx, d, dlen);
65 RIPEMD160_Final((uint8_t*)h.
data(), &my->ctx );
69 RIPEMD160_Init( &my->ctx);
104 to_variant( std::vector<char>( (
const char*)&bi, ((
const char*)&bi) +
sizeof(bi) ), v, max_depth );
108 std::vector<char> ve = v.
as< std::vector<char> >( max_depth );
109 memset( &bi,
char(0),
sizeof(bi) );
111 memcpy( &bi, ve.
data(), std::min<size_t>(ve.size(),
sizeof(bi)) );
void write(const char *d, uint32_t dlen)
friend T & operator<<(T &ds, const ripemd160 &ep)
void from_variant(const variant &var, flat_set< T, A... > &vo, uint32_t _max_depth)
boost::endian::little_uint32_buf_t _hash[5]
std::string to_hex(const char *d, uint32_t s)
friend bool operator<(const ripemd160 &h1, const ripemd160 &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 ripemd160 &h1, const ripemd160 &h2)
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
friend bool operator>(const ripemd160 &h1, const ripemd160 &h2)
friend bool operator>=(const ripemd160 &h1, const ripemd160 &h2)
static ripemd160 hash(const fc::sha512 &h)
static constexpr size_t data_size()
friend ripemd160 operator^(const ripemd160 &h1, const ripemd160 &h2)
friend bool operator!=(const ripemd160 &h1, const ripemd160 &h2)