nxt.crypto

## Enum HashFunction

- java.lang.Object
- - java.lang.Enum<HashFunction>
  - - nxt.crypto.HashFunction

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<HashFunction>

      public enum HashFunction
      extends java.lang.Enum<HashFunction>

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `Keccak25` Use proprietary NXT implementation of Keccak with 25 rounds (code 25)
    `RIPEMD160`
    `RIPEMD160_SHA256`
    `SCRYPT` Use Java implementation of Scrypt
    `SHA256` Use Java implementation of SHA256 (code 2)
    `SHA3` Use Bouncy Castle implementation of SHA3 (code 3).

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static HashFunction` | `getHashFunction(byte id)`
    `byte` | `getId()`
    `abstract byte[]` | `hash(byte[] input)`
    `static HashFunction` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static HashFunction[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### SHA256

          public static final HashFunction SHA256

      Use Java implementation of SHA256 (code 2)

    - #### SHA3

          public static final HashFunction SHA3

      Use Bouncy Castle implementation of SHA3 (code 3). As of Bouncy Castle 1.53, this has been renamed to Keccak.

    - #### SCRYPT

          public static final HashFunction SCRYPT

      Use Java implementation of Scrypt

    - #### Keccak25

          public static final HashFunction Keccak25

      Use proprietary NXT implementation of Keccak with 25 rounds (code 25)

    - #### RIPEMD160

          public static final HashFunction RIPEMD160

    - #### RIPEMD160_SHA256

          public static final HashFunction RIPEMD160_SHA256

  - ### Method Detail

    - #### values

          public static HashFunction[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (HashFunction c : HashFunction.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static HashFunction valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getHashFunction

          public static HashFunction getHashFunction(byte id)

    - #### getId

          public byte getId()

    - #### hash

          public abstract byte[] hash(byte[] input)