Module crypt.api

Enum Class SecureRandomAlgorithm

java.lang.Object
java.lang.Enum<SecureRandomAlgorithm>
io.github.astrapi69.crypt.api.algorithm.SecureRandomAlgorithm
All Implemented Interfaces:
Algorithm, Serializable, Comparable<SecureRandomAlgorithm>, Constable

public enum SecureRandomAlgorithm extends Enum<SecureRandomAlgorithm> implements Algorithm
The enum SecureRandomAlgorithm provides algorithms for generation of random number generator (RNG) that are used with the SecureRandom object.

Note: See what algorithm can be used with your operating system.
For more info see: https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#securerandom-number-generation-algorithms
  • Enum Constant Details

    • NativePRNG

      public static final SecureRandomAlgorithm NativePRNG
      The enum constant for NativePRNG algorithm.
    • NativePRNGBlocking

      public static final SecureRandomAlgorithm NativePRNGBlocking
      The enum constant for NativePRNGBlocking algorithm.
    • NativePRNGNonBlocking

      public static final SecureRandomAlgorithm NativePRNGNonBlocking
      The enum constant for NativePRNGNonBlocking algorithm.
    • PKCS11

      public static final SecureRandomAlgorithm PKCS11
      The enum constant for PKCS11 algorithm.
    • SHA1PRNG

      public static final SecureRandomAlgorithm SHA1PRNG
      The enum constant for SHA1PRNG algorithm.
    • Windows_PRNG

      public static final SecureRandomAlgorithm Windows_PRNG
      The enum constant for Windows-PRNG algorithm.
    • UNKNOWN

      public static final SecureRandomAlgorithm UNKNOWN
      The enum constant 'UNKNOWN' if the MessageDigest algorithm is unknown
  • Method Details

    • values

      public static SecureRandomAlgorithm[] 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 SecureRandomAlgorithm 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
    • getAlgorithm

      public String getAlgorithm()
      Gets the algorithm for encryption or decryption
      Specified by:
      getAlgorithm in interface Algorithm
      Returns:
      the algorithm