Enum KeyUsage

    • Enum Constant Detail

      • digitalSignature

        public static final KeyUsage digitalSignature
        for SSL client certificates, S/MIME signing certificates, and object-signing certificates.
      • nonRepudiation

        public static final KeyUsage nonRepudiation
        for some S/MIME signing certificates and object-signing certificates.
      • keyEncipherment

        public static final KeyUsage keyEncipherment
        or SSL server certificates and S/MIME encryption certificates.
      • dataEncipherment

        public static final KeyUsage dataEncipherment
        when the subject's public key is used to encrypt user data instead of key material.
      • keyAgreement

        public static final KeyUsage keyAgreement
        when the subject's public key is used for key agreement.
      • keyCertSign

        public static final KeyUsage keyCertSign
        for all CA signing certificates.
      • cRLSign

        public static final KeyUsage cRLSign
        for CA signing certificates that are used to sign CRLs.
      • encipherOnly

        public static final KeyUsage encipherOnly
        if the public key is used only for enciphering data. If this bit is set, keyAgreement should also be set.
      • decipherOnly

        public static final KeyUsage decipherOnly
        if the public key is used only for deciphering data. If this bit is set, keyAgreement should also be set.
    • Field Detail

      • OID

        public static final String OID
        OID of KeyUsage.
    • Method Detail

      • values

        public static KeyUsage[] 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 (KeyUsage c : KeyUsage.values())
            System.out.println(c);
        
        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
      • value

        public int value()
        Returns:
        the integer value representing this usage.