added hash template func
This commit is contained in:
parent
e4fbbe52b0
commit
d82dc3a782
1 changed files with 3 additions and 0 deletions
|
|
@ -19,6 +19,9 @@ namespace fc {
|
|||
static sha1 hash( const char* d, uint32_t dlen );
|
||||
static sha1 hash( const fc::string& );
|
||||
|
||||
template<typename T>
|
||||
static sha1 hash( const T& t ) { sha1::encoder e; e << t; return e.result(); }
|
||||
|
||||
class encoder {
|
||||
public:
|
||||
encoder();
|
||||
|
|
|
|||
Loading…
Reference in a new issue