BSX-21 Import Bitcoin Private Key from String
This commit is contained in:
parent
63c6b2a02b
commit
57769e4df9
2 changed files with 2 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ class sha256
|
|||
public:
|
||||
sha256();
|
||||
explicit sha256( const string& hex_str );
|
||||
explicit sha256( const char *data );
|
||||
|
||||
string str()const;
|
||||
operator string()const;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace fc {
|
||||
|
||||
sha256::sha256() { memset( _hash, 0, sizeof(_hash) ); }
|
||||
sha256::sha256( const char *data ) { memcpy(_hash, data, sizeof(_hash) ); }
|
||||
sha256::sha256( const string& hex_str ) {
|
||||
fc::from_hex( hex_str, (char*)_hash, sizeof(_hash) );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue