mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add sha512Half and SHA512HashHasher:
These routines replace existing code to compute SHA512-Half hashes. The new code accumulates serialized data into a hashing context instead of allocating a buffer, for improved performance.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
//==============================================================================
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/basics/SHA512Half.h>
|
||||
#include <ripple/basics/TestSuite.h>
|
||||
#include <ripple/protocol/RippleAddress.h>
|
||||
#include <ripple/protocol/RipplePublicKey.h>
|
||||
@@ -46,7 +47,7 @@ public:
|
||||
|
||||
// Check node signing.
|
||||
Blob vucTextSrc = strCopy ("Hello, nurse!");
|
||||
uint256 uHash = getSHA512Half (vucTextSrc);
|
||||
uint256 uHash = sha512Half(make_Slice(vucTextSrc));
|
||||
Blob vucTextSig;
|
||||
|
||||
naNodePrivate.signNodePrivate (uHash, vucTextSig);
|
||||
|
||||
Reference in New Issue
Block a user