Enum Algorithm

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Algorithm>

    public enum Algorithm
    extends java.lang.Enum<Algorithm>
    Identifies the cryptographic algorithm used with the key.
    Version:
    September 13, 2021
    Author:
    Javier Rojas Blum, Sergey Manoylo
    • Enum Constant Detail

      • ES256K

        public static final Algorithm ES256K
      • RSA1_5

        public static final Algorithm RSA1_5
      • RSA_OAEP

        public static final Algorithm RSA_OAEP
      • RSA_OAEP_256

        public static final Algorithm RSA_OAEP_256
      • ECDH_ES

        public static final Algorithm ECDH_ES
      • ECDH_ES_PLUS_A128KW

        public static final Algorithm ECDH_ES_PLUS_A128KW
      • ECDH_ES_PLUS_A192KW

        public static final Algorithm ECDH_ES_PLUS_A192KW
      • ECDH_ES_PLUS_A256KW

        public static final Algorithm ECDH_ES_PLUS_A256KW
      • A128KW

        public static final Algorithm A128KW
      • A192KW

        public static final Algorithm A192KW
      • A256KW

        public static final Algorithm A256KW
      • A128GCMKW

        public static final Algorithm A128GCMKW
      • A192GCMKW

        public static final Algorithm A192GCMKW
      • A256GCMKW

        public static final Algorithm A256GCMKW
      • PBES2_HS256_PLUS_A128KW

        public static final Algorithm PBES2_HS256_PLUS_A128KW
      • PBES2_HS384_PLUS_A192KW

        public static final Algorithm PBES2_HS384_PLUS_A192KW
      • PBES2_HS512_PLUS_A256KW

        public static final Algorithm PBES2_HS512_PLUS_A256KW
    • Method Detail

      • values

        public static Algorithm[] 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 (Algorithm c : Algorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Algorithm 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
      • getParamName

        public java.lang.String getParamName()
      • getOutName

        public java.lang.String getOutName()
      • getDescription

        public java.lang.String getDescription()
      • getUse

        public Use getUse()
      • getKeyLength

        public int getKeyLength()
      • canGenerateKeys

        public boolean canGenerateKeys()
      • fill

        public void fill​(org.json.JSONObject jsonObject)
      • fromString

        public static Algorithm fromString​(java.lang.String param)
        Returns the corresponding Algorithm for a parameter.
        Parameters:
        param - The use parameter.
        Returns:
        The corresponding algorithm if found, otherwise null.
      • fromString

        public static java.util.List<Algorithm> fromString​(java.lang.String[] params,
                                                           Use use)
      • toString

        public java.lang.String toString()
        Returns a string representation of the object. In this case the parameter name.
        Overrides:
        toString in class java.lang.Enum<Algorithm>
        Returns:
        The string representation of the object.