Class BcKeyStoreSpi
- java.lang.Object
-
- java.security.KeyStoreSpi
-
- org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi
-
- All Implemented Interfaces:
BCKeyStore
- Direct Known Subclasses:
BcKeyStoreSpi.BouncyCastleStore
,BcKeyStoreSpi.Std
,BcKeyStoreSpi.Version1
public class BcKeyStoreSpi extends java.security.KeyStoreSpi implements BCKeyStore
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BcKeyStoreSpi.BouncyCastleStore
the BouncyCastle store.static class
BcKeyStoreSpi.Std
static class
BcKeyStoreSpi.Version1
-
Constructor Summary
Constructors Constructor Description BcKeyStoreSpi(int version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumeration
engineAliases()
boolean
engineContainsAlias(java.lang.String alias)
void
engineDeleteEntry(java.lang.String alias)
java.security.cert.Certificate
engineGetCertificate(java.lang.String alias)
java.lang.String
engineGetCertificateAlias(java.security.cert.Certificate cert)
java.security.cert.Certificate[]
engineGetCertificateChain(java.lang.String alias)
java.util.Date
engineGetCreationDate(java.lang.String alias)
java.security.Key
engineGetKey(java.lang.String alias, char[] password)
boolean
engineIsCertificateEntry(java.lang.String alias)
boolean
engineIsKeyEntry(java.lang.String alias)
void
engineLoad(java.io.InputStream stream, char[] password)
void
engineSetCertificateEntry(java.lang.String alias, java.security.cert.Certificate cert)
void
engineSetKeyEntry(java.lang.String alias, byte[] key, java.security.cert.Certificate[] chain)
void
engineSetKeyEntry(java.lang.String alias, java.security.Key key, char[] password, java.security.cert.Certificate[] chain)
int
engineSize()
void
engineStore(java.io.OutputStream stream, char[] password)
protected void
loadStore(java.io.InputStream in)
protected javax.crypto.Cipher
makePBECipher(java.lang.String algorithm, int mode, char[] password, byte[] salt, int iterationCount)
protected void
saveStore(java.io.OutputStream out)
void
setRandom(java.security.SecureRandom rand)
set the random source for the key store
-
-
-
Method Detail
-
makePBECipher
protected javax.crypto.Cipher makePBECipher(java.lang.String algorithm, int mode, char[] password, byte[] salt, int iterationCount) throws java.io.IOException
- Throws:
java.io.IOException
-
setRandom
public void setRandom(java.security.SecureRandom rand)
Description copied from interface:BCKeyStore
set the random source for the key store- Specified by:
setRandom
in interfaceBCKeyStore
-
engineAliases
public java.util.Enumeration engineAliases()
- Specified by:
engineAliases
in classjava.security.KeyStoreSpi
-
engineContainsAlias
public boolean engineContainsAlias(java.lang.String alias)
- Specified by:
engineContainsAlias
in classjava.security.KeyStoreSpi
-
engineDeleteEntry
public void engineDeleteEntry(java.lang.String alias) throws java.security.KeyStoreException
- Specified by:
engineDeleteEntry
in classjava.security.KeyStoreSpi
- Throws:
java.security.KeyStoreException
-
engineGetCertificate
public java.security.cert.Certificate engineGetCertificate(java.lang.String alias)
- Specified by:
engineGetCertificate
in classjava.security.KeyStoreSpi
-
engineGetCertificateAlias
public java.lang.String engineGetCertificateAlias(java.security.cert.Certificate cert)
- Specified by:
engineGetCertificateAlias
in classjava.security.KeyStoreSpi
-
engineGetCertificateChain
public java.security.cert.Certificate[] engineGetCertificateChain(java.lang.String alias)
- Specified by:
engineGetCertificateChain
in classjava.security.KeyStoreSpi
-
engineGetCreationDate
public java.util.Date engineGetCreationDate(java.lang.String alias)
- Specified by:
engineGetCreationDate
in classjava.security.KeyStoreSpi
-
engineGetKey
public java.security.Key engineGetKey(java.lang.String alias, char[] password) throws java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException
- Specified by:
engineGetKey
in classjava.security.KeyStoreSpi
- Throws:
java.security.NoSuchAlgorithmException
java.security.UnrecoverableKeyException
-
engineIsCertificateEntry
public boolean engineIsCertificateEntry(java.lang.String alias)
- Specified by:
engineIsCertificateEntry
in classjava.security.KeyStoreSpi
-
engineIsKeyEntry
public boolean engineIsKeyEntry(java.lang.String alias)
- Specified by:
engineIsKeyEntry
in classjava.security.KeyStoreSpi
-
engineSetCertificateEntry
public void engineSetCertificateEntry(java.lang.String alias, java.security.cert.Certificate cert) throws java.security.KeyStoreException
- Specified by:
engineSetCertificateEntry
in classjava.security.KeyStoreSpi
- Throws:
java.security.KeyStoreException
-
engineSetKeyEntry
public void engineSetKeyEntry(java.lang.String alias, byte[] key, java.security.cert.Certificate[] chain) throws java.security.KeyStoreException
- Specified by:
engineSetKeyEntry
in classjava.security.KeyStoreSpi
- Throws:
java.security.KeyStoreException
-
engineSetKeyEntry
public void engineSetKeyEntry(java.lang.String alias, java.security.Key key, char[] password, java.security.cert.Certificate[] chain) throws java.security.KeyStoreException
- Specified by:
engineSetKeyEntry
in classjava.security.KeyStoreSpi
- Throws:
java.security.KeyStoreException
-
engineSize
public int engineSize()
- Specified by:
engineSize
in classjava.security.KeyStoreSpi
-
loadStore
protected void loadStore(java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
saveStore
protected void saveStore(java.io.OutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
engineLoad
public void engineLoad(java.io.InputStream stream, char[] password) throws java.io.IOException
- Specified by:
engineLoad
in classjava.security.KeyStoreSpi
- Throws:
java.io.IOException
-
engineStore
public void engineStore(java.io.OutputStream stream, char[] password) throws java.io.IOException
- Specified by:
engineStore
in classjava.security.KeyStoreSpi
- Throws:
java.io.IOException
-
-