Enum KeyUsage

java.lang.Object
java.lang.Enum<KeyUsage>
com.codename1.security.vault.KeyUsage
All Implemented Interfaces:
Comparable<KeyUsage>

public enum KeyUsage extends Enum<KeyUsage>

What a KeyHandle is allowed to do.

Usages are fixed when a handle is created and are not widened afterwards. A handle created to seal records cannot be talked into signing, which matters because the two operations under one key is a classic way to turn a confidentiality primitive into an oracle. Web Crypto enforces the same restriction on a CryptoKey, and this mirrors it so a port cannot be more permissive than the browser is.

  • Enum Constant Details

  • Method Details

    • values

      public static KeyUsage[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static KeyUsage 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