org.bouncycastle.jce.provider

Class JDKKeyStore

Implemented Interfaces:
BCKeyStore
Known Direct Subclasses:
JDKKeyStore.BouncyCastleStore

public class JDKKeyStore
extends KeyStoreSpi
implements BCKeyStore

Nested Class Summary

static class
JDKKeyStore.BouncyCastleStore
the BouncyCastle store.

Field Summary

protected SecureRandom
random
protected Hashtable
table

Constructor Summary

JDKKeyStore()

Method Summary

Enumeration
engineAliases()
boolean
engineContainsAlias(String alias)
void
engineDeleteEntry(String alias)
Certificate
engineGetCertificate(String alias)
String
engineGetCertificateAlias(Certificate cert)
Certificate[]
engineGetCertificateChain(String alias)
Date
engineGetCreationDate(String alias)
Key
engineGetKey(String alias, char[] password)
boolean
engineIsCertificateEntry(String alias)
boolean
engineIsKeyEntry(String alias)
void
engineLoad(InputStream stream, char[] password)
void
engineSetCertificateEntry(String alias, Certificate cert)
void
engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)
void
engineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
int
engineSize()
void
engineStore(OutputStream stream, char[] password)
protected boolean
isSameAs(byte[] one, byte[] two)
protected void
loadStore(InputStream in)
protected Cipher
makePBECipher(String algorithm, int mode, char[] password, byte[] salt, int iterationCount)
protected void
saveStore(OutputStream out)
void
setRandom(SecureRandom rand)
set the random source for the key store

Field Details

random

protected SecureRandom random

table

protected Hashtable table

Constructor Details

JDKKeyStore

public JDKKeyStore()

Method Details

engineAliases

public Enumeration engineAliases()

engineContainsAlias

public boolean engineContainsAlias(String alias)

engineDeleteEntry

public void engineDeleteEntry(String alias)
            throws KeyStoreException

engineGetCertificate

public Certificate engineGetCertificate(String alias)

engineGetCertificateAlias

public String engineGetCertificateAlias(Certificate cert)

engineGetCertificateChain

public Certificate[] engineGetCertificateChain(String alias)

engineGetCreationDate

public Date engineGetCreationDate(String alias)

engineGetKey

public Key engineGetKey(String alias,
                        char[] password)
            throws NoSuchAlgorithmException,
                   UnrecoverableKeyException

engineIsCertificateEntry

public boolean engineIsCertificateEntry(String alias)

engineIsKeyEntry

public boolean engineIsKeyEntry(String alias)

engineLoad

public void engineLoad(InputStream stream,
                       char[] password)
            throws IOException

engineSetCertificateEntry

public void engineSetCertificateEntry(String alias,
                                      Certificate cert)
            throws KeyStoreException

engineSetKeyEntry

public void engineSetKeyEntry(String alias,
                              Key key,
                              char[] password,
                              Certificate[] chain)
            throws KeyStoreException

engineSetKeyEntry

public void engineSetKeyEntry(String alias,
                              byte[] key,
                              Certificate[] chain)
            throws KeyStoreException

engineSize

public int engineSize()

engineStore

public void engineStore(OutputStream stream,
                        char[] password)
            throws IOException

isSameAs

protected boolean isSameAs(byte[] one,
                           byte[] two)

loadStore

protected void loadStore(InputStream in)
            throws IOException

makePBECipher

protected Cipher makePBECipher(String algorithm,
                               int mode,
                               char[] password,
                               byte[] salt,
                               int iterationCount)
            throws IOException

saveStore

protected void saveStore(OutputStream out)
            throws IOException

setRandom

public void setRandom(SecureRandom rand)
set the random source for the key store
Specified by:
setRandom in interface BCKeyStore