added hash template func

This commit is contained in:
Daniel Larimer 2012-09-13 19:00:21 -04:00
parent e4fbbe52b0
commit d82dc3a782

View file

@ -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();