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>
21 sha1::operator std::string()
const {
return str(); }
41 return hash( s.c_str(), s.size() );
45 SHA1_Update( &my->ctx, d, dlen);
49 SHA1_Final((uint8_t*)h.
data(), &my->ctx );
88 to_variant( std::vector<char>( (
const char*)&bi, ((
const char*)&bi) +
sizeof(bi) ), v, max_depth );
92 std::vector<char> ve = v.
as< std::vector<char> >( max_depth );
93 memset( &bi,
char(0),
sizeof(bi) );
95 memcpy( &bi, ve.
data(), std::min<size_t>(ve.size(),
sizeof(bi)) );
friend sha1 operator^(const sha1 &h1, const sha1 &h2)
boost::endian::little_uint32_buf_t _hash[5]
friend bool operator>(const sha1 &h1, const sha1 &h2)
friend bool operator>=(const sha1 &h1, const sha1 &h2)
friend bool operator==(const sha1 &h1, const sha1 &h2)
friend bool operator!=(const sha1 &h1, const sha1 &h2)
static constexpr size_t data_size()
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 sha1 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)
friend bool operator<(const sha1 &h1, const sha1 &h2)
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
friend T & operator<<(T &ds, const sha1 &ep)
void write(const char *d, uint32_t dlen)