BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
2 #include <boost/endian/buffers.hpp>
14 explicit sha256(
const string& hex_str );
15 explicit sha256(
const char *
data,
size_t size );
18 operator string()
const;
21 static constexpr
size_t data_size() {
return 256 / 8; }
23 static sha256 hash(
const char* d, uint32_t dlen );
41 void write(
const char* d, uint32_t dlen );
53 ds.write( ep.
data(),
sizeof(ep) );
59 ds.read( ep.
data(),
sizeof(ep) );
71 boost::endian::little_uint64_buf_t
_hash[4];
77 inline void pack( T& ds,
const sha256& ep, uint32_t _max_depth ) {
98 struct hash<
fc::sha256>
102 return *((
size_t*)&s);
void write(const char *d, uint32_t dlen)
FC_REFLECT_TYPENAME(fc::log_message)
void unpack(Stream &s, flat_set< T, A... > &value, uint32_t _max_depth)
friend bool operator<(const sha256 &h1, const sha256 &h2)
static constexpr size_t data_size()
void from_variant(const variant &var, flat_set< T, A... > &vo, uint32_t _max_depth)
static sha256 hash(const T &t)
Defines types and macros used to provide reflection.
friend T & operator>>(T &ds, sha256 &ep)
size_t operator()(const fc::sha256 &s) const
friend bool operator!=(const sha256 &h1, const sha256 &h2)
friend bool operator==(const sha256 &h1, const sha256 &h2)
friend bool operator>(const sha256 &h1, const sha256 &h2)
boost::endian::little_uint64_buf_t _hash[4]
void to_variant(const flat_set< T, A... > &var, variant &vo, uint32_t _max_depth)
friend T & operator<<(T &ds, const sha256 &ep)
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
friend bool operator>=(const sha256 &h1, const sha256 &h2)
friend sha256 operator^(const sha256 &h1, const sha256 &h2)
static sha256 hash(const char *d, uint32_t dlen)
Used to forward declare value types.
void pack(Stream &s, const flat_set< T, A... > &value, uint32_t _max_depth)