Top Inners Fields Constructors Methods
org.bouncycastle.jcajce.provider.keystore.bc

public Class BcKeyStoreSpi

extends KeyStoreSpi
implements BCKeyStore
Class Inheritance
All Implemented Interfaces
org.bouncycastle.jce.interfaces.BCKeyStore
Known Direct Subclasses
org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.BouncyCastleStore, org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.Std, org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.Version1
Imports
java.io.ByteArrayInputStream, .ByteArrayOutputStream, .DataInputStream, .DataOutputStream, .IOException, .InputStream, .OutputStream, java.security.Key, .KeyStoreException, .KeyStoreSpi, .NoSuchAlgorithmException, .NoSuchProviderException, .PrivateKey, .PublicKey, .SecureRandom, .UnrecoverableKeyException, java.security.cert.Certificate, .CertificateEncodingException, .CertificateException, .CertificateFactory, java.security.spec.KeySpec, .PKCS8EncodedKeySpec, .X509EncodedKeySpec, java.util.Date, .Enumeration, .Hashtable, javax.crypto.Cipher, .SecretKeyFactory, javax.crypto.spec.PBEKeySpec, .PBEParameterSpec, .SecretKeySpec, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo, org.bouncycastle.crypto.CipherParameters, .CryptoServicesRegistrar, .Digest, .PBEParametersGenerator, org.bouncycastle.crypto.digests.SHA1Digest, org.bouncycastle.crypto.generators.PKCS12ParametersGenerator, org.bouncycastle.crypto.io.DigestInputStream, .DigestOutputStream, .MacInputStream, .MacOutputStream, org.bouncycastle.crypto.macs.HMac, org.bouncycastle.jcajce.io.CipherInputStream, .CipherOutputStream, org.bouncycastle.jcajce.util.BCJcaJceHelper, .JcaJceHelper, org.bouncycastle.jce.interfaces.BCKeyStore, org.bouncycastle.jce.provider.BouncyCastleProvider, org.bouncycastle.util.Arrays, .Properties, org.bouncycastle.util.io.Streams, .TeeOutputStream

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class
BcKeyStoreSpi.BouncyCastleStore

the BouncyCastle store.

public static class
private class
public static class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
private final JcaJceHelper
pack-priv static final int
private static final String
pack-priv static final int
pack-priv static final int
private static final int
pack-priv static final int
private static final int
pack-priv static final int
protected SecureRandom
pack-priv static final int
pack-priv static final int
private static final String
private static final int
private static final int
protected Hashtable<K, V>
protected int

Constructor Summary

AccessConstructor and Description
public
BcKeyStoreSpi(int version)

Method Summary

Modifier and TypeMethod and Description
private Certificate
private Key
private void
private void
public Enumeration<E>
engineAliases()

Implements abstract java.security.KeyStoreSpi.engineAliases.

Lists all the alias names of this keystore.
public boolean
engineContainsAlias(String
the alias name
alias
)

Implements abstract java.security.KeyStoreSpi.engineContainsAlias.

Checks if the given alias exists in this keystore.
public void
engineDeleteEntry(String
the alias name
alias
)

Implements abstract java.security.KeyStoreSpi.engineDeleteEntry.

Deletes the entry identified by the given alias from this keystore.
public Certificate
engineGetCertificate(String
the alias name
alias
)

Implements abstract java.security.KeyStoreSpi.engineGetCertificate.

Returns the certificate associated with the given alias.
public String
engineGetCertificateAlias(Certificate
the certificate to match with.
cert
)

Implements abstract java.security.KeyStoreSpi.engineGetCertificateAlias.

Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
public Certificate[]
engineGetCertificateChain(String
the alias name
alias
)

Implements abstract java.security.KeyStoreSpi.engineGetCertificateChain.

Returns the certificate chain associated with the given alias.
public Date
engineGetCreationDate(String
the alias name
alias
)

Implements abstract java.security.KeyStoreSpi.engineGetCreationDate.

Returns the creation date of the entry identified by the given alias.
public Key
engineGetKey(String
the alias name
alias
,
char[]
the password for recovering the key
password
)

Implements abstract java.security.KeyStoreSpi.engineGetKey.

Returns the key associated with the given alias, using the given password to recover it.
public boolean
engineIsCertificateEntry(String
the alias for the keystore entry to be checked
alias
)

Implements abstract java.security.KeyStoreSpi.engineIsCertificateEntry.

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.
public boolean
engineIsKeyEntry(String
the alias for the keystore entry to be checked
alias
)

Implements abstract java.security.KeyStoreSpi.engineIsKeyEntry.

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.
public void
engineLoad(InputStream
the input stream from which the keystore is loaded, or null
stream
,
char[]
the password used to check the integrity of the keystore, the password used to unlock the keystore, or null
password
)

Implements abstract java.security.KeyStoreSpi.engineLoad.

Loads the keystore from the given input stream.
public void
engineSetCertificateEntry(String
the alias name
alias
,
Certificate
the certificate
cert
)

Implements abstract java.security.KeyStoreSpi.engineSetCertificateEntry.

Assigns the given certificate to the given alias.
public void
engineSetKeyEntry(String
the alias name
alias
,
byte[]
the key (in protected format) to be associated with the alias
key
,
Certificate[]
the certificate chain for the corresponding public key (only useful if the protected key is of type java.security.PrivateKey).
chain
)

Implements abstract java.security.KeyStoreSpi.engineSetKeyEntry.

Assigns the given key (that has already been protected) to the given alias.
public void
engineSetKeyEntry(String
the alias name
alias
,
Key
the key to be associated with the alias
key
,
char[]
the password to protect the key
password
,
Certificate[]
the certificate chain for the corresponding public key (only required if the given key is of type java.security.PrivateKey).
chain
)

Implements abstract java.security.KeyStoreSpi.engineSetKeyEntry.

Assigns the given key to the given alias, protecting it with the given password.
public int
engineSize()

Implements abstract java.security.KeyStoreSpi.engineSize.

Retrieves the number of entries in this keystore.
public void
engineStore(OutputStream
the output stream to which this keystore is written.
stream
,
char[]
the password to generate the keystore integrity check. May be null if the keystore does not support or require an integrity check.
password
)

Implements abstract java.security.KeyStoreSpi.engineStore.

Stores this keystore to the given output stream, and protects its integrity with the given password.
protected void
protected Cipher
makePBECipher(String algorithm, int mode, char[] password, byte[] salt, int iterationCount)

protected void
public void
setRandom(SecureRandom rand)

Implements org.bouncycastle.jce.interfaces.BCKeyStore.setRandom.

set the random source for the key store
Inherited from java.security.KeyStoreSpi:
engineEntryInstanceOfengineGetAttributesengineGetEntryengineLoadengineProbeengineSetEntryengineStore