API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.security. KeyStore View Source
Author(s)
Jan Luehe
Since
1.2
Version
1.53, 07/28/06
Serial
Hierarchy
 Object
      KeyStore
Implements
Subclasses
Description
public class KeyStore
  This class represents a storage facility for cryptographic keys and certificates.
Constructors
protected KeyStore (KeyStoreSpi keyStoreSpi, Provider provider, String type)
  Creates a KeyStore object of the given type, and encapsulates the given provider implementation (SPI object) in it.
Methods
Hide/Show inherited methods
publicfinal Enumeration<String> aliases () throws KeyStoreException
  Lists all the alias names of this keystore.
publicfinal boolean containsAlias (String alias) throws KeyStoreException
  Checks if the given alias exists in this keystore.
publicfinal void deleteEntry (String alias) throws KeyStoreException
  Deletes the entry identified by the given alias from this keystore.
publicfinal boolean entryInstanceOf (String alias, Class<Entry> entryClass) throws KeyStoreException
  Determines if the keystore Entry for the specified alias is an instance or subclass of the specified entryClass.
publicfinal Certificate getCertificate (String alias) throws KeyStoreException
  Returns the certificate associated with the given alias.
publicfinal String getCertificateAlias (Certificate cert) throws KeyStoreException
  Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
publicfinal Certificate getCertificateChain (String alias) throws KeyStoreException
  Returns the certificate chain associated with the given alias.
publicfinal Date getCreationDate (String alias) throws KeyStoreException
  Returns the creation date of the entry identified by the given alias.
publicfinalstatic String getDefaultType ()
  Returns the default keystore type as specified in the Java security properties file, or the string "jks" (acronym for "Java keystore") if no such property exists.
publicfinal Entry getEntry (String alias, ProtectionParameter protParam) throws NoSuchAlgorithmException UnrecoverableEntryException KeyStoreException
  Gets a keystore Entry for the specified alias with the specified protection parameter.
publicstatic KeyStore getInstance (String type) throws KeyStoreException
  Returns a keystore object of the specified type.
publicstatic KeyStore getInstance (String type, Provider provider) throws KeyStoreException
  Returns a keystore object of the specified type.
publicstatic KeyStore getInstance (String type, String provider) throws KeyStoreException NoSuchProviderException
  Returns a keystore object of the specified type.
publicfinal Key getKey (String alias, char[] password) throws KeyStoreException NoSuchAlgorithmException UnrecoverableKeyException
  Returns the key associated with the given alias, using the given password to recover it.
publicfinal Provider getProvider ()
  Returns the provider of this keystore.
publicfinal String getType ()
  Returns the type of this keystore.
publicfinal boolean isCertificateEntry (String alias) throws KeyStoreException
  Returns true if the entry identified by the given alias was created by a call to setCertificateEntry, or created by a call to setEntry with a TrustedCertificateEntry.
publicfinal boolean isKeyEntry (String alias) throws KeyStoreException
  Returns true if the entry identified by the given alias was created by a call to setKeyEntry, or created by a call to setEntry with a PrivateKeyEntry or a SecretKeyEntry.
publicfinal void load (InputStream stream, char[] password) throws IOException NoSuchAlgorithmException CertificateException
  Loads this KeyStore from the given input stream.
publicfinal void load (LoadStoreParameter param) throws IOException NoSuchAlgorithmException CertificateException
  Loads this keystore using the given LoadStoreParameter.
publicfinal void setCertificateEntry (String alias, Certificate cert) throws KeyStoreException
  Assigns the given trusted certificate to the given alias.
publicfinal void setEntry (String alias, Entry entry, ProtectionParameter protParam) throws KeyStoreException
  Saves a keystore Entry under the specified alias.
publicfinal void setKeyEntry (String alias, byte[] key, Certificate chain) throws KeyStoreException
  Assigns the given key (that has already been protected) to the given alias.
publicfinal void setKeyEntry (String alias, Key key, char[] password, Certificate chain) throws KeyStoreException
  Assigns the given key to the given alias, protecting it with the given password.
publicfinal int size () throws KeyStoreException
  Retrieves the number of entries in this keystore.
publicfinal void store (LoadStoreParameter param) throws KeyStoreException IOException NoSuchAlgorithmException CertificateException
  Stores this keystore using the given LoadStoreParameter.
publicfinal void store (OutputStream stream, char[] password) throws KeyStoreException IOException NoSuchAlgorithmException CertificateException
  Stores this keystore to the given output stream, and protects its integrity with the given password.
Fields
Hide/Show inherited fields
Nested Classes
  KeyStore.LoadStoreParameter
A marker interface for KeyStore load and store parameters.
  KeyStore.ProtectionParameter
A marker interface for keystore protection parameters.
  KeyStore.PasswordProtection
A password-based implementation of ProtectionParameter.
  KeyStore.CallbackHandlerProtection
A ProtectionParameter encapsulating a CallbackHandler.
  KeyStore.Entry
A marker interface for KeyStore entry types.
  KeyStore.PrivateKeyEntry
A KeyStore entry that holds a PrivateKey and corresponding certificate chain.
  KeyStore.SecretKeyEntry
A KeyStore entry that holds a SecretKey.
  KeyStore.TrustedCertificateEntry
A KeyStore entry that holds a trusted Certificate.
  KeyStore.Builder
A description of a to-be-instantiated KeyStore object.
  KeyStore.SimpleLoadStoreParameter
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar