Enum KeyPairGeneratorSpi.Usage

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<KeyPairGeneratorSpi.Usage>
    Enclosing class:
    KeyPairGeneratorSpi

    public static enum KeyPairGeneratorSpi.Usage
    extends java.lang.Enum<KeyPairGeneratorSpi.Usage>
    In PKCS #11, each keypair can be marked with the operations it will be used to perform. Some tokens require that a key be marked for an operation before the key can be used to perform that operation; other tokens don't care. NSS provides a way to specify a set of flags and a corresponding mask for these flags. If a specific usage is desired set the value for that usage. If it is not set, let NSS behave in it's default fashion. If a behavior is desired, also set that behavior in the mask as well as the flags.
    • Method Detail

      • values

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

        public static KeyPairGeneratorSpi.Usage valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getVal

        @Deprecated
        public int getVal()
        Deprecated.
        Use ordinal() instead.
      • value

        public long value()
        Get PKCS #11 CKF_ value.