Package org.kiwiproject.security
Enum KeyStoreType
- java.lang.Object
-
- java.lang.Enum<KeyStoreType>
-
- org.kiwiproject.security.KeyStoreType
-
- All Implemented Interfaces:
Serializable,Comparable<KeyStoreType>
public enum KeyStoreType extends Enum<KeyStoreType>
KeyStore types that can be specified when generating an instance ofKeyStoreusingKeyStore.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
Providerclass, in the constructor of the nested (and private)ServiceKeyclass where the following LOC resides:algorithm = algorithm.toUpperCase(ENGLISH);
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DKSA domain keystore is a collection of keystores presented as a single logical keystore.JCEKSThe proprietary keystore implementation provided by the SunJCE provider.JKSThe proprietary keystore implementation provided by the SUN provider.PKCS11A keystore backed by a PCKS #11 token.PKCS12The transfer syntax for personal identity information as defined in PKCS #12.
-
Field Summary
Fields Modifier and Type Field Description StringvalueThe keystore type as a String which can be directly supplied toKeyStore.getInstance(String).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyStoreTypevalueOf(String name)Returns the enum constant of this type with the specified name.static KeyStoreType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 theDomainLoadStoreParameterclass.
-
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.
-
-
Field Detail
-
value
public final String value
The keystore type as a String which can be directly supplied toKeyStore.getInstance(String).
-
-
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 nameNullPointerException- if the argument is null
-
-