O'Reilly logo

Java Security by Scott Oaks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Class java.security.KeyStore

Synopsis

This class is responsible for maintaining a set of keys and their related owners. In the default implementation, this class maintains the .keystore file held in the user’s home directory, but you may provide an alternate implementation of this class that holds keys anywhere: in a database, on a remote filesystem, on a Java smart card, or any and all of the above. The class that is used to provide the default keystore implementation is specified by the keystore property in the $JDKHOME/lib/java.security file. The keystore may optionally require a passphrase for access to the entire keystore (via the load() method); this passphrase is often used only for sanity checking and is often not specified at all. On the other hand, private keys in the keystore should be protected (e.g., encrypted) by using a different passphrase for each private key.

Note that although the keystore associates entities with keys, it does not rely upon the Identity class itself.

Class Definition

public abstract class java.security.KeyStore extends java.lang.Object { // Constructors protected KeyStore(KeyStoreSpi, Provider, String); // Class Methods public static final String getDefaultType(); public static KeyStore getInstance(String); public static KeyStore getInstance(String, String); // Instance Methods public final Enumeration aliases(); public final boolean containsAlias(String); public final void deleteEntry(String); public final Certificate getCertificate(String); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required