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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
the BouncyCastle store.static class
static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
engineContainsAlias
(String alias) void
engineDeleteEntry
(String alias) engineGetCertificate
(String alias) engineGetCertificateChain
(String alias) engineGetCreationDate
(String alias) 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, byte[] key, Certificate[] chain) void
engineSetKeyEntry
(String alias, Key key, char[] password, Certificate[] chain) int
void
engineStore
(OutputStream stream, char[] password) 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 storeMethods inherited from class java.security.KeyStoreSpi
engineEntryInstanceOf, engineGetAttributes, engineGetEntry, engineLoad, engineProbe, engineSetEntry, engineStore
-
Field Details
-
table
-
random
-
version
protected int version
-
-
Constructor Details
-
BcKeyStoreSpi
public BcKeyStoreSpi(int version)
-
-
Method Details
-
makePBECipher
protected Cipher makePBECipher(String algorithm, int mode, char[] password, byte[] salt, int iterationCount) throws IOException - Throws:
IOException
-
setRandom
Description copied from interface:BCKeyStore
set the random source for the key store- Specified by:
setRandom
in interfaceBCKeyStore
-
engineAliases
- Specified by:
engineAliases
in classKeyStoreSpi
-
engineContainsAlias
- Specified by:
engineContainsAlias
in classKeyStoreSpi
-
engineDeleteEntry
- Specified by:
engineDeleteEntry
in classKeyStoreSpi
- Throws:
KeyStoreException
-
engineGetCertificate
- Specified by:
engineGetCertificate
in classKeyStoreSpi
-
engineGetCertificateAlias
- Specified by:
engineGetCertificateAlias
in classKeyStoreSpi
-
engineGetCertificateChain
- Specified by:
engineGetCertificateChain
in classKeyStoreSpi
-
engineGetCreationDate
- Specified by:
engineGetCreationDate
in classKeyStoreSpi
-
engineGetKey
public Key engineGetKey(String alias, char[] password) throws NoSuchAlgorithmException, UnrecoverableKeyException - Specified by:
engineGetKey
in classKeyStoreSpi
- Throws:
NoSuchAlgorithmException
UnrecoverableKeyException
-
engineIsCertificateEntry
- Specified by:
engineIsCertificateEntry
in classKeyStoreSpi
-
engineIsKeyEntry
- Specified by:
engineIsKeyEntry
in classKeyStoreSpi
-
engineSetCertificateEntry
- Specified by:
engineSetCertificateEntry
in classKeyStoreSpi
- Throws:
KeyStoreException
-
engineSetKeyEntry
public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) throws KeyStoreException - Specified by:
engineSetKeyEntry
in classKeyStoreSpi
- Throws:
KeyStoreException
-
engineSetKeyEntry
public void engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) throws KeyStoreException - Specified by:
engineSetKeyEntry
in classKeyStoreSpi
- Throws:
KeyStoreException
-
engineSize
public int engineSize()- Specified by:
engineSize
in classKeyStoreSpi
-
loadStore
- Throws:
IOException
-
saveStore
- Throws:
IOException
-
engineLoad
- Specified by:
engineLoad
in classKeyStoreSpi
- Throws:
IOException
-
engineStore
- Specified by:
engineStore
in classKeyStoreSpi
- Throws:
IOException
-