Enum OpenSSLAlgorithm

java.lang.Object
java.lang.Enum<OpenSSLAlgorithm>
org.cryptacular.pbe.OpenSSLAlgorithm
All Implemented Interfaces:
Serializable, Comparable<OpenSSLAlgorithm>, java.lang.constant.Constable

public enum OpenSSLAlgorithm extends Enum<OpenSSLAlgorithm>
Describes block ciphers allowed with the OpenSSL password-based encryption scheme.
Author:
Middleware Services
  • Enum Constant Details

    • AES_128_CBC

      public static final OpenSSLAlgorithm AES_128_CBC
      AES-128 in CBC mode.
    • AES_192_CBC

      public static final OpenSSLAlgorithm AES_192_CBC
      AES-192 in CBC mode.
    • AES_256_CBC

      public static final OpenSSLAlgorithm AES_256_CBC
      AES-256 in CBC mode.
    • DES_CBC

      public static final OpenSSLAlgorithm DES_CBC
      DES in CBC mode.
    • DES_EDE3_CBC

      public static final OpenSSLAlgorithm DES_EDE3_CBC
      Triple DES in CBC mode.
    • RC2_CBC

      public static final OpenSSLAlgorithm RC2_CBC
      128-bit RC2 in CBC mode.
    • RC2_40_CBC

      public static final OpenSSLAlgorithm RC2_40_CBC
      40-bit RC2 in CBC mode.
    • RC2_64_CBC

      public static final OpenSSLAlgorithm RC2_64_CBC
      64-bit RC2 in CBC mode.
  • Method Details

    • values

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

      public static OpenSSLAlgorithm valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getAlgorithmId

      public String getAlgorithmId()
      Returns:
      OpenSSL algorithm identifier, e.g. aes-128-cbc.
    • getCipherSpec

      public KeyedBlockCipherSpec getCipherSpec()
      Returns:
      Cipher algorithm specification.
    • fromAlgorithmId

      public static OpenSSLAlgorithm fromAlgorithmId(String algorithmId)
      Converts an OID to the corresponding algorithm specification.
      Parameters:
      algorithmId - Algorithm OID.
      Returns:
      Algorithm spec.