Package edu.iu.crypt

Enum Class WebKey.Use

java.lang.Object
java.lang.Enum<WebKey.Use>
edu.iu.crypt.WebKey.Use
All Implemented Interfaces:
Serializable, Comparable<WebKey.Use>, Constable
Enclosing interface:
WebKey

public static enum WebKey.Use extends Enum<WebKey.Use>
Enumerates public key use.
  • Enum Constant Details

    • SIGN

      public static final WebKey.Use SIGN
      Used for digital signing.
    • ENCRYPT

      public static final WebKey.Use ENCRYPT
      Used for encryption.
  • Field Details

    • use

      public final String use
      JSON use attribute value.
  • Method Details

    • values

      public static WebKey.Use[] 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 WebKey.Use 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
    • from

      public static WebKey.Use from(String use)
      Gets the value equivalent to the JWK use attribute.
      Parameters:
      use - JWK use attribute value
      Returns:
      WebKey.Use