Package org.xrpl.xrpl4j.keypairs
Class HashUtils
java.lang.Object
org.xrpl.xrpl4j.keypairs.HashUtils
Hashing utilities for XRPL related hashing algorithms.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UnsignedByteArray
addUInt32
(UnsignedByteArray bytes, Integer integerToAdd) Add an Unsigned 32 bit integer to anUnsignedByteArray
.static UnsignedByteArray
sha512Half
(byte[] bytes) Compute a SHA-512 hash of the given bytes and return the first half of the result.static UnsignedByteArray
sha512Half
(UnsignedByteArray bytes) Compute a SHA-512 hash of the given bytes and return the first half of the result.
-
Constructor Details
-
HashUtils
public HashUtils()
-
-
Method Details
-
sha512Half
Compute a SHA-512 hash of the given bytes and return the first half of the result.- Parameters:
bytes
- The bytes to half hash.- Returns:
- An
UnsignedByteArray
containing the first half of the SHA-512 hash of bytes.
-
sha512Half
Compute a SHA-512 hash of the given bytes and return the first half of the result.- Parameters:
bytes
- The bytes to half hash.- Returns:
- An
UnsignedByteArray
containing the first half of the SHA-512 hash of bytes.
-
addUInt32
Add an Unsigned 32 bit integer to anUnsignedByteArray
.- Parameters:
bytes
- AnUnsignedByteArray
to append to.integerToAdd
- AnInteger
with 4 signed bytes to add to bytes.- Returns:
- The resulting
UnsignedByteArray
.
-