Enum KeyStoreType

  • All Implemented Interfaces:
    Serializable, Comparable<KeyStoreType>

    public enum KeyStoreType
    extends Enum<KeyStoreType>
    KeyStore types that can be specified when generating an instance of KeyStore using KeyStore.getInstance(String).
    Implementation Note:
    These are from the Java 11 documentation, specifically from "Java Security Standard Algorithm Names". Also note that while that document lists the types in lower case, the JDK actually uppercases the protocol so using the actual uppercase enum names here works (until and unless they add new protocols that contain things like dots or underscores or other such characters that aren't allowed as enum names). In any case, the types are case-insensitive in the JDK. See the Provider class, in the constructor of the nested (and private) ServiceKey class where the following LOC resides: algorithm = algorithm.toUpperCase(ENGLISH);
    • Enum Constant Detail

      • JCEKS

        public static final KeyStoreType JCEKS
        The proprietary keystore implementation provided by the SunJCE provider.
      • JKS

        public static final KeyStoreType JKS
        The proprietary keystore implementation provided by the SUN provider.
      • DKS

        public static final KeyStoreType DKS
        A domain keystore is a collection of keystores presented as a single logical keystore. It is specified by configuration data whose syntax is described in the DomainLoadStoreParameter class.
      • PKCS11

        public static final KeyStoreType PKCS11
        A keystore backed by a PCKS #11 token.
      • PKCS12

        public static final KeyStoreType PKCS12
        The transfer syntax for personal identity information as defined in PKCS #12.
    • Method Detail

      • values

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

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