Module crypt.api

Enum Class CipherAlgorithm

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

public enum CipherAlgorithm extends Enum<CipherAlgorithm> implements Algorithm
The enum CipherAlgorithm that defines the names for the algorithm component in a transformation when requesting an instance of Cipher object
  • Enum Constant Details

    • AES

      public static final CipherAlgorithm AES
      The enum constant for AES algorithm.
    • AESWrap

      public static final CipherAlgorithm AESWrap
      The enum constant for AES algorithm.
    • ARCFOUR

      public static final CipherAlgorithm ARCFOUR
      The enum constant for ARCFOUR algorithm.
    • Blowfish

      public static final CipherAlgorithm Blowfish
      The Blowfish algorithm.
    • ChaCha20

      public static final CipherAlgorithm ChaCha20
      The ChaCha20 algorithm.
    • ChaCha20_Poly1305

      public static final CipherAlgorithm ChaCha20_Poly1305
      The ChaCha20-Poly1305 algorithm.
    • DES

      public static final CipherAlgorithm DES
      The DES algorithm.
    • DESede

      public static final CipherAlgorithm DESede
      The DESede algorithm.
    • DESedeWrap

      public static final CipherAlgorithm DESedeWrap
      The DESedeWrap algorithm.
    • ECIES

      public static final CipherAlgorithm ECIES
      The DESedeWrap algorithm.
    • RC2

      public static final CipherAlgorithm RC2
      The RC2 algorithm.
    • RC4

      public static final CipherAlgorithm RC4
      The RC4 algorithm.
    • RC5

      public static final CipherAlgorithm RC5
      The RC5 algorithm.
    • RSA

      public static final CipherAlgorithm RSA
      The enum constant for RSA algorithm.
    • UNKNOWN

      public static final CipherAlgorithm UNKNOWN
      The enum constant 'UNKNOWN' if the cipher algorithm is unknown
  • Field Details

    • AES_WRAP_ALGORITHM_NAME

      public static final String AES_WRAP_ALGORITHM_NAME
      The string constant AES_WRAP_ALGORITHM_NAME
      See Also:
    • CHA_CHA_20_ALGORITHM_NAME

      public static final String CHA_CHA_20_ALGORITHM_NAME
      The string constant CHA_CHA_20_ALGORITHM_NAME
      See Also:
    • CHA_CHA_20_POLY1305_ALGORITHM_NAME

      public static final String CHA_CHA_20_POLY1305_ALGORITHM_NAME
      The string constant CHA_CHA_20_ALGORITHM_NAME
      See Also:
    • DES_EDE_WRAP_ALGORITHM_NAME

      public static final String DES_EDE_WRAP_ALGORITHM_NAME
      The string constant DES_EDE_WRAP_ALGORITHM_NAME
      See Also:
    • ECIES_ALGORITHM_NAME

      public static final String ECIES_ALGORITHM_NAME
      The string constant ECIES_ALGORITHM_NAME
      See Also:
    • RC2_ALGORITHM_NAME

      public static final String RC2_ALGORITHM_NAME
      The string constant RC2_ALGORITHM_NAME
      See Also:
    • RC4_ALGORITHM_NAME

      public static final String RC4_ALGORITHM_NAME
      The string constant RC4_ALGORITHM_NAME
      See Also:
    • RC5_ALGORITHM_NAME

      public static final String RC5_ALGORITHM_NAME
      The string constant RC5_ALGORITHM_NAME
      See Also:
  • Method Details

    • values

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