Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
com.sun.crypto.provider
public final class: JceKeyStore [javadoc | source]
java.lang.Object
   java.security.KeyStoreSpi
      com.sun.crypto.provider.JceKeyStore
This class provides the keystore implementation referred to as "jceks". This implementation strongly protects the keystore private keys using triple-DES, where the triple-DES encryption/decryption key is derived from the user's password. The encrypted private keys are stored in the keystore in a standard format, namely the EncryptedPrivateKeyInfo format defined in PKCS #8.
Method from com.sun.crypto.provider.JceKeyStore Summary:
engineAliases,   engineContainsAlias,   engineDeleteEntry,   engineGetCertificate,   engineGetCertificateAlias,   engineGetCertificateChain,   engineGetCreationDate,   engineGetKey,   engineIsCertificateEntry,   engineIsKeyEntry,   engineLoad,   engineSetCertificateEntry,   engineSetKeyEntry,   engineSetKeyEntry,   engineSize,   engineStore
Methods from java.security.KeyStoreSpi:
engineAliases,   engineContainsAlias,   engineDeleteEntry,   engineEntryInstanceOf,   engineGetCertificate,   engineGetCertificateAlias,   engineGetCertificateChain,   engineGetCreationDate,   engineGetEntry,   engineGetKey,   engineIsCertificateEntry,   engineIsKeyEntry,   engineLoad,   engineLoad,   engineSetCertificateEntry,   engineSetEntry,   engineSetKeyEntry,   engineSetKeyEntry,   engineSize,   engineStore,   engineStore
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.JceKeyStore Detail:
 public Enumeration engineAliases() 
    Lists all the alias names of this keystore.
 public boolean engineContainsAlias(String alias) 
    Checks if the given alias exists in this keystore.
 public  void engineDeleteEntry(String alias) throws KeyStoreException 
    Deletes the entry identified by the given alias from this keystore.
 public Certificate engineGetCertificate(String alias) 
    Returns the certificate associated with the given alias.

    If the given alias name identifies a trusted certificate entry, the certificate associated with that entry is returned. If the given alias name identifies a key entry, the first element of the certificate chain of that entry is returned, or null if that entry does not have a certificate chain.

 public String engineGetCertificateAlias(Certificate cert) 
    Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.

    This method attempts to match the given certificate with each keystore entry. If the entry being considered is a trusted certificate entry, the given certificate is compared to that entry's certificate. If the entry being considered is a key entry, the given certificate is compared to the first element of that entry's certificate chain (if a chain exists).

 public Certificate[] engineGetCertificateChain(String alias) 
    Returns the certificate chain associated with the given alias.
 public Date engineGetCreationDate(String alias) 
    Returns the creation date of the entry identified by the given alias.
 public Key engineGetKey(String alias,
    char[] password) throws NoSuchAlgorithmException, UnrecoverableKeyException 
    Returns the key associated with the given alias, using the given password to recover it.
 public boolean engineIsCertificateEntry(String alias) 
    Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
 public boolean engineIsKeyEntry(String alias) 
    Returns true if the entry identified by the given alias is a key entry, and false otherwise.
 public  void engineLoad(InputStream stream,
    char[] password) throws IOException, NoSuchAlgorithmException, CertificateException 
    Loads the keystore from the given input stream.

    If a password is given, it is used to check the integrity of the keystore data. Otherwise, the integrity of the keystore is not checked.

 public  void engineSetCertificateEntry(String alias,
    Certificate cert) throws KeyStoreException 
    Assigns the given certificate to the given alias.

    If the given alias already exists in this keystore and identifies a trusted certificate entry, the certificate associated with it is overridden by the given certificate.

 public  void engineSetKeyEntry(String alias,
    byte[] key,
    Certificate[] chain) throws KeyStoreException 
    Assigns the given key (that has already been protected) to the given alias.

    If the protected key is of type java.security.PrivateKey, it must be accompanied by a certificate chain certifying the corresponding public key.

    If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).

 public  void engineSetKeyEntry(String alias,
    Key key,
    char[] password,
    Certificate[] chain) throws KeyStoreException 
    Assigns the given key to the given alias, protecting it with the given password.

    If the given key is of type java.security.PrivateKey, it must be accompanied by a certificate chain certifying the corresponding public key.

    If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).

 public int engineSize() 
    Retrieves the number of entries in this keystore.
 public  void engineStore(OutputStream stream,
    char[] password) throws IOException, NoSuchAlgorithmException, CertificateException 
    Stores this keystore to the given output stream, and protects its integrity with the given password.