Enum KeyType

    • Enum Constant Detail

      • RSA

        public static final KeyType RSA
        RSA key.
      • EC

        public static final KeyType EC
        Elliptical Curve Key.
      • OCT

        public static final KeyType OCT
        Octet Key.
      • OKP

        public static final KeyType OKP
        Octet key-pair.
    • Method Detail

      • values

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

        public static KeyType 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
      • value

        public String value()
        Get the value of the KeyType.
        Returns:
        the value of the KeyType
      • getRequiredFields

        public Set<String> getRequiredFields()
        The minimum set of fields that are required for a JWK of this type.
        Returns:
        the minimum set of fields for this type of JWK.
      • getKeyType

        public static KeyType getKeyType​(String keyType)
        Get the KeyType given a string.
        Parameters:
        keyType - string representing the KeyType
        Returns:
        a KeyType or null if given null KeyType
      • toString

        public String toString()
        Gets the value of the KeyType.
        Overrides:
        toString in class Enum<KeyType>
        Returns:
        value of the KeyType