#include <sha1.hpp>
Definition at line 7 of file sha1.hpp.
◆ sha1() [1/2]
Definition at line 13 of file sha1.cpp.
memset(pInfo->slotDescription, ' ', 64)
◆ sha1() [2/2]
fc::sha1::sha1 |
( |
const string & | hex_str | ) |
|
|
explicit |
Definition at line 14 of file sha1.cpp.
14 {
16 if( bytes_written <
sizeof(
_hash) )
18}
◆ data() [1/2]
char * fc::sha1::data |
( |
| ) |
|
◆ data() [2/2]
const char * fc::sha1::data |
( |
| ) |
const |
◆ data_size()
size_t fc::sha1::data_size |
( |
| ) |
const |
|
inline |
◆ hash() [1/3]
Definition at line 38 of file sha1.cpp.
38 {
39 encoder e;
40 e.write(d,dlen);
41 return e.result();
42}
◆ hash() [2/3]
Definition at line 43 of file sha1.cpp.
43 {
44 return hash(
s.c_str(),
s.size() );
45}
static sha1 hash(const char *d, uint32_t dlen)
◆ hash() [3/3]
static sha1 fc::sha1::hash |
( |
const T & | t | ) |
|
|
inlinestatic |
Definition at line 24 of file sha1.hpp.
25 {
26 sha1::encoder e;
27 e << t;
28 return e.result();
29 }
◆ operator string()
fc::sha1::operator string |
( |
| ) |
const |
◆ str()
string fc::sha1::str |
( |
| ) |
const |
Definition at line 20 of file sha1.cpp.
20 {
22}
fc::string to_hex(const char *d, uint32_t s)
◆ operator!=
Definition at line 82 of file sha1.cpp.
82 {
83 return memcmp( h1._hash, h2._hash, sizeof(h1._hash) ) != 0;
84}
◆ operator<
bool operator< |
( |
const sha1 & | h1, |
|
|
const sha1 & | h2 ) |
|
friend |
Definition at line 79 of file sha1.cpp.
79 {
80 return memcmp( h1._hash, h2._hash, sizeof(h1._hash) ) < 0;
81}
◆ operator<< [1/2]
Definition at line 59 of file sha1.cpp.
59 {
61 fc::detail::shift_l( h1.data(), result.data(), result.data_size(), i );
62 return result;
63}
◆ operator<< [2/2]
T & operator<< |
( |
T & | ds, |
|
|
const sha1 & | ep ) |
|
friend |
Definition at line 48 of file sha1.hpp.
48 {
49 ds.write( ep.data(),
sizeof(ep) );
51 }
static const Segment ds(Segment::ds)
◆ operator==
bool operator== |
( |
const sha1 & | h1, |
|
|
const sha1 & | h2 ) |
|
friend |
Definition at line 85 of file sha1.cpp.
85 {
86 return memcmp( h1._hash, h2._hash, sizeof(h1._hash) ) == 0;
87}
◆ operator>
bool operator> |
( |
const sha1 & | h1, |
|
|
const sha1 & | h2 ) |
|
friend |
Definition at line 76 of file sha1.cpp.
76 {
77 return memcmp( h1._hash, h2._hash, sizeof(h1._hash) ) > 0;
78}
◆ operator>=
bool operator>= |
( |
const sha1 & | h1, |
|
|
const sha1 & | h2 ) |
|
friend |
Definition at line 73 of file sha1.cpp.
73 {
74 return memcmp( h1._hash, h2._hash, sizeof(h1._hash) ) >= 0;
75}
◆ operator>>
T & operator>> |
( |
T & | ds, |
|
|
sha1 & | ep ) |
|
friend |
Definition at line 54 of file sha1.hpp.
54 {
55 ds.read( ep.data(),
sizeof(ep) );
57 }
◆ operator^
Definition at line 64 of file sha1.cpp.
64 {
66 result._hash[0] = h1._hash[0] ^ h2._hash[0];
67 result._hash[1] = h1._hash[1] ^ h2._hash[1];
68 result._hash[2] = h1._hash[2] ^ h2._hash[2];
69 result._hash[3] = h1._hash[3] ^ h2._hash[3];
70 result._hash[4] = h1._hash[4] ^ h2._hash[4];
71 return result;
72}
◆ _hash
The documentation for this class was generated from the following files: