Package org.xrpl.xrpl4j.crypto
Class HashingUtils
java.lang.Object
org.xrpl.xrpl4j.crypto.HashingUtils
Hashing utilities for XRPL-related hashing algorithms.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UnsignedByteArrayaddUInt32(UnsignedByteArray bytes, Integer integerToAdd) Add an Unsigned 32-bit integer to anUnsignedByteArray.static UnsignedByteArraysha512Half(byte[] bytes) Compute a SHA-512 hash of the given bytes and return the first half of the result.static UnsignedByteArraysha512Half(UnsignedByteArray bytes) Compute a SHA-512 hash of the given bytes and return the first half of the result.
-
Constructor Details
-
HashingUtils
public HashingUtils()
-
-
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
UnsignedByteArraycontaining 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
UnsignedByteArraycontaining the first half of the SHA-512 hash of bytes.
-
addUInt32
Add an Unsigned 32-bit integer to anUnsignedByteArray.- Parameters:
bytes- AnUnsignedByteArrayto append to.integerToAdd- AnIntegerwith 4 signed bytes to add to bytes.- Returns:
- The resulting
UnsignedByteArray.
-