Enum Class SHS.HashAlgorithm

java.lang.Object
java.lang.Enum<SHS.HashAlgorithm>
uk.co.sculptor.kflibjava.SHS.HashAlgorithm
All Implemented Interfaces:
Serializable, Comparable<SHS.HashAlgorithm>, Constable
Enclosing class:
SHS

public static enum SHS.HashAlgorithm extends Enum<SHS.HashAlgorithm>
Possible Hash Algorithms
  • Enum Constant Details

    • SHA0_SC

      public static final SHS.HashAlgorithm SHA0_SC
      Hash Algorithm definition SHA0 + convert to 15 ASCII values (Not supported in Java)
    • SHA0

      public static final SHS.HashAlgorithm SHA0
      Hash Algorithm definition SHA0 (20 bytes - 160 bits) (Not supported in Java)
    • SHA1

      public static final SHS.HashAlgorithm SHA1
      Hash Algorithm definition SHA1 (20 bytes - 160 bits)
    • SHA224

      public static final SHS.HashAlgorithm SHA224
      Hash Algorithm definition SHA2 -> SH224 (28 bytes - 224 bits)
    • SHA256

      public static final SHS.HashAlgorithm SHA256
      Hash Algorithm definition SHA2 -> SH256 (32 bytes - 256 bits)
    • SHA384

      public static final SHS.HashAlgorithm SHA384
      Hash Algorithm definition SHA2 -> SH384 (48 bytes - 384 bits)
    • SHA512

      public static final SHS.HashAlgorithm SHA512
      Hash Algorithm definition SHA2 -> SH512 (64 bytes - 512 bits)
  • Method Details

    • values

      public static SHS.HashAlgorithm[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SHS.HashAlgorithm valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getFromInt

      public static SHS.HashAlgorithm getFromInt(int hashAlgorithm) throws KfException
      Convert a received value to a HashAlgorithm enumerator
      Parameters:
      hashAlgorithm - The Sculptor value to be translated to enumerator
      Returns:
      the enumerator value
      Throws:
      KfException - when the hashAlgorithm value is invalid
    • min

      public static SHS.HashAlgorithm min(SHS.HashAlgorithm algA, SHS.HashAlgorithm algB)
      Method that returns the "minimum" algorithm.
      Parameters:
      algA - Algorithm A to have the minimum
      algB - Algorithm B to have the minimum
      Returns:
      The "simpler" algorithm from algA and algB.
    • getInt

      public int getInt()
      Convert the HashAlgorithm as the int value used on KfServer
      Returns:
      the int value used on KfServer