Class Utils

java.lang.Object
org.xrpl.xrpl4j.codec.addresses.Utils

public class Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • doubleDigest

      public static byte[] doubleDigest(byte[] input)
      Parameters:
      input - A byte array to double digest.
      Returns:
      The SHA-256 hash of the SHA-256 hash of the given input.
    • doubleDigest

      public static byte[] doubleDigest(byte[] input, int offset, int length)
      Calculates the SHA-256 hash of the given byte range, and then hashes the resulting hash again. This is standard procedure in XRPL. The resulting hash is in big endian form.
      Parameters:
      input - A byte array to double digest.
      offset - The beginning index of the input to digest.
      length - The length of the input to digest.
      Returns:
      The SHA-256 hash of the SHA-256 hash of the given input.