Enum SymmetricKeyAlgorithm

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AES_128
      AES with 128-bit key.
      AES_192
      AES with 192-bit key.
      AES_256
      AES with 256-bit key.
      BLOWFISH
      Blowfish (128-bit key, 16 rounds).
      CAMELLIA_128
      Reserved for Camellia with 128-bit key.
      CAMELLIA_192
      Reserved for Camellia with 192-bit key.
      CAMELLIA_256
      Reserved for Camellia with 256-bit key.
      CAST5
      CAST5 (128-bit key, as per RFC2144).
      DES
      Reserved in RFC4880.
      IDEA
      Deprecated.
      use a different algorithm.
      NULL
      Plaintext or unencrypted data.
      SAFER
      Reserved in RFC4880.
      TRIPLE_DES
      TripleDES (DES-EDE - 168 bit key derived from 192).
      TWOFISH
      Twofish with 256-bit key.
    • Method Detail

      • values

        public static SymmetricKeyAlgorithm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SymmetricKeyAlgorithm c : SymmetricKeyAlgorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SymmetricKeyAlgorithm valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • fromId

        public static SymmetricKeyAlgorithm fromId​(int id)
        Return the SymmetricKeyAlgorithm enum that corresponds to the provided numeric id. If an invalid id is provided, null is returned.
        Parameters:
        id - numeric algorithm id
        Returns:
        symmetric key algorithm enum
      • getAlgorithmId

        public int getAlgorithmId()
        Return the numeric algorithm id of the enum.
        Returns:
        numeric id