BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
28 #include <openssl/sha.h>
29 #include <openssl/ripemd.h>
50 hash160::operator string()
const {
return str(); }
68 return hash( s.c_str(), s.size() );
73 SHA256_Update( &my->ctx, d, dlen);
78 unsigned char sha_hash[SHA256_DIGEST_LENGTH];
79 SHA256_Final( sha_hash, &my->ctx );
81 RIPEMD160_CTX ripe_ctx;
82 RIPEMD160_Init(&ripe_ctx);
83 RIPEMD160_Update( &ripe_ctx, sha_hash, SHA256_DIGEST_LENGTH );
85 RIPEMD160_Final( (uint8_t *)h.
data(), &ripe_ctx );
91 SHA256_Init(&my->ctx);
132 to_variant( std::vector<char>( (
const char*)&bi, ((
const char*)&bi) +
sizeof(bi) ), v, max_depth );
137 std::vector<char> ve = v.
as< std::vector<char> >( max_depth );
138 memset( &bi,
char(0),
sizeof(bi) );
140 memcpy( &bi, ve.
data(), std::min<size_t>(ve.size(),
sizeof(bi)) );
static constexpr size_t data_size()
friend bool operator<(const hash160 &h1, const hash160 &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 hash160 operator^(const hash160 &h1, const hash160 &h2)
friend bool operator==(const hash160 &h1, const hash160 &h2)
static hash160 hash(const char *d, uint32_t dlen)
T as(uint32_t max_depth) const
void to_variant(const flat_set< T, A... > &var, variant &vo, uint32_t _max_depth)
void write(const char *d, uint32_t dlen)
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Defines exception's used by fc.
friend T & operator<<(T &ds, const hash160 &ep)
friend bool operator!=(const hash160 &h1, const hash160 &h2)
friend bool operator>(const hash160 &h1, const hash160 &h2)
friend bool operator>=(const hash160 &h1, const hash160 &h2)
boost::endian::little_uint32_buf_t _hash[5]