Enum JwkKeyFormat

    • Enum Constant Detail

      • USING_USE

        public static final JwkKeyFormat USING_USE
        A JWK format that only includes the use parameter to express the key's usage.
      • USING_KEY_OPS

        public static final JwkKeyFormat USING_KEY_OPS
        A JWK format that only includes the key_ops parameter to express the key's usage.
      • USING_USE_AND_KEY_OPS

        public static final JwkKeyFormat USING_USE_AND_KEY_OPS
        A JWK format that includes both the use and key_ops parameters to express the key's usage.
    • Method Detail

      • values

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

        public static JwkKeyFormat 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
      • export

        public JWK export​(CryptoKey key,
                          Key rawKey)
        Description copied from interface: KeyFormat
        Exports the given crypto key and raw key material.
        Specified by:
        export in interface KeyFormat<JWK>
        Parameters:
        key - the crypto key.
        rawKey - the raw key material.
        Returns:
        the exported key material in the given format.