Class Hashing

java.lang.Object
org.drasyl.crypto.Hashing

public final class Hashing extends Object
Util class that provides hashing functions for drasyl.
  • Method Details

    • sha256

      public static byte[] sha256(String input)
      Generates a SHA-256 hash of the given input.
      Parameters:
      input - the input to hash
      Returns:
      SHA-256 hash of the input
      Throws:
      IllegalArgumentException - if SHA-256 hash could not be created
    • sha256

      public static byte[] sha256(byte[]... input)
      Generates a SHA-256 hash of the given input.
      Parameters:
      input - the input to hash
      Returns:
      SHA-256 hash of the input
      Throws:
      IllegalArgumentException - if SHA-256 hash could not be created