Enum Class RNGAlgorithm

java.lang.Object
java.lang.Enum<RNGAlgorithm>
org.europa.together.domain.RNGAlgorithm
All Implemented Interfaces:
Serializable, Comparable<RNGAlgorithm>, Constable

public enum RNGAlgorithm extends Enum<RNGAlgorithm>
Random Number Generator Algorithm.
  • Enum Constant Details

    • SHA1PRNG

      public static final RNGAlgorithm SHA1PRNG
      The name of the pseudo-random number generation (PRNG) algorithm supplied by the SUN provider. This algorithm uses SHA-1 as the foundation of the PRNG. It computes the SHA-1 hash over a true-random seed value concatenated with a 64-bit counter which is incremented by 1 for each operation. From the 160-bit SHA-1 output, only 64 bits are used.
    • NativePRNG

      public static final RNGAlgorithm NativePRNG
      Obtains random numbers from the underlying native OS. No assertions are made as to the blocking nature of generating these numbers.
    • PKCS11

      public static final RNGAlgorithm PKCS11
      Obtains random numbers from the underlying installed and configured PKCS #11 library.
    • DRBG

      public static final RNGAlgorithm DRBG
      An algorithm using DRBG mechanisms as defined in NIST SP 800-90Ar1.
  • Method Details

    • values

      public static RNGAlgorithm[] 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 RNGAlgorithm 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