Define fc::ripemd160::hash() for arbitrary serializable objects
This commit is contained in:
parent
41630e7629
commit
54a51c3471
1 changed files with 16 additions and 15 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <fc/fwd.hpp>
|
|
||||||
#include <fc/string.hpp>
|
|
||||||
#include <fc/reflect/typename.hpp>
|
|
||||||
|
|
||||||
|
#include <fc/fwd.hpp>
|
||||||
|
#include <fc/io/raw_fwd.hpp>
|
||||||
|
#include <fc/reflect/typename.hpp>
|
||||||
|
#include <fc/string.hpp>
|
||||||
|
|
||||||
namespace fc{
|
namespace fc{
|
||||||
class sha512;
|
class sha512;
|
||||||
|
|
@ -28,7 +29,7 @@ class ripemd160
|
||||||
static ripemd160 hash( const T& t )
|
static ripemd160 hash( const T& t )
|
||||||
{
|
{
|
||||||
ripemd160::encoder e;
|
ripemd160::encoder e;
|
||||||
e << t;
|
fc::raw::pack( e, t );
|
||||||
return e.result();
|
return e.result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue