Enum JWEAlg

    • Enum Constant Detail

      • RSA1_5

        public static final JWEAlg RSA1_5
        "RSA1_5" (1); RSAES-PKCS1-V1_5.
      • RSA_OAEP

        public static final JWEAlg RSA_OAEP
        "RSA-OAEP" (2); RSAES OAEP using default parameters.
      • RSA_OAEP_256

        public static final JWEAlg RSA_OAEP_256
        "RSA-OAEP-256" (3); RSAES OAEP using SHA-256 and MGF1 with SHA-256.
      • A128KW

        public static final JWEAlg A128KW
        "A128KW" (4); AES Key Wrap with default initial value using 128 bit key.
      • A192KW

        public static final JWEAlg A192KW
        "A192KW" (5); AES Key Wrap with default initial value using 192 bit key.
      • A256KW

        public static final JWEAlg A256KW
        "A256KW" (6); AES Key Wrap with default initial value using 256 bit key.
      • DIR

        public static final JWEAlg DIR
        "dir" (7); Direct use of a shared symmetric key as the CEK.
      • ECDH_ES

        public static final JWEAlg ECDH_ES
        "ECDH-ES" (8); Elliptic Curve Diffie-Hellman Ephemeral Static key agreement using Concat KDF.
      • ECDH_ES_A128KW

        public static final JWEAlg ECDH_ES_A128KW
        "ECDH-ES+A128KW" (9); ECDH-ES using Concat KDF and CEK wrapped with "A128KW".
      • ECDH_ES_A192KW

        public static final JWEAlg ECDH_ES_A192KW
        "ECDH-ES+A192KW" (10); ECDH-ES using Concat KDF and CEK wrapped with "A192KW".
      • ECDH_ES_A256KW

        public static final JWEAlg ECDH_ES_A256KW
        "ECDH-ES+A256KW" (11); ECDH-ES using Concat KDF and CEK wrapped with "A256KW".
      • A128GCMKW

        public static final JWEAlg A128GCMKW
        "A128GCMKW" (12); Key wrapping with AES GCM using 128 bit key.
      • A192GCMKW

        public static final JWEAlg A192GCMKW
        "A192GCMKW" (13); Key wrapping with AES GCM using 192 bit key.
      • A256GCMKW

        public static final JWEAlg A256GCMKW
        "A256GCMKW" (14); Key wrapping with AES GCM using 256 bit key.
      • PBES2_HS256_A128KW

        public static final JWEAlg PBES2_HS256_A128KW
        "PBES2-HS256+A128KW" (15); PBES2 with HMAC SHA-256 and "A128KW".
      • PBES2_HS384_A192KW

        public static final JWEAlg PBES2_HS384_A192KW
        "PBES2-HS384+A192KW" (16); PBES2 with HMAC SHA-384 and "A192KW".
      • PBES2_HS512_A256KW

        public static final JWEAlg PBES2_HS512_A256KW
        "PBES2-HS512+A256KW" (17); PBES2 with HMAC SHA-512 and "A256KW".
    • Method Detail

      • values

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

        public static JWEAlg 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
      • getValue

        public short getValue()
        Get the integer representation of this enum instance.
      • getByValue

        public static JWEAlg getByValue​(short value)
        Find an instance of this enum by a value.
        Parameters:
        value - The integer representation of the instance to find.
        Returns:
        An instance of this enum, or null if not found.
      • parse

        public static JWEAlg parse​(String alg)
        Convert String to JWEAlg.
        Parameters:
        alg - Algorithm name. For example, "RSA1_5".
        Returns:
        JWEAlg instance, or null.
      • toArray

        public static JWEAlg[] toArray​(int bits)