Package org.bouncycastle.jcajce
Class BCFKSLoadStoreParameter.Builder
- java.lang.Object
-
- org.bouncycastle.jcajce.BCFKSLoadStoreParameter.Builder
-
- Enclosing class:
- BCFKSLoadStoreParameter
public static class BCFKSLoadStoreParameter.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
Base constructor for creating a LoadStoreParameter for initializing a key store.Builder(java.io.InputStream in, char[] password)
Base constructor for reading a KeyStore from an InputStream using a password.Builder(java.io.InputStream in, java.security.KeyStore.ProtectionParameter protectionParameter)
Base constructor for reading a KeyStore from an InputStream using a password.Builder(java.io.OutputStream out, char[] password)
Base constructor for storing to an OutputStream using a password.Builder(java.io.OutputStream out, java.security.KeyStore.ProtectionParameter protectionParameter)
Base constructor for storing to an OutputStream using a protection parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BCFKSLoadStoreParameter
build()
Build and return a BCFKSLoadStoreParameter.BCFKSLoadStoreParameter.Builder
withStoreEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg)
Configure the encryption algorithm to use for protecting the KeyStore and its keys.BCFKSLoadStoreParameter.Builder
withStoreMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm macAlg)
Configure the MAC algorithm to use for protecting the KeyStore.BCFKSLoadStoreParameter.Builder
withStorePBKDFConfig(PBKDFConfig storeConfig)
Configure the PBKDF to use for protecting the KeyStore.
-
-
-
Constructor Detail
-
Builder
public Builder()
Base constructor for creating a LoadStoreParameter for initializing a key store.
-
Builder
public Builder(java.io.OutputStream out, char[] password)
Base constructor for storing to an OutputStream using a password.- Parameters:
out
- OutputStream to write KeyStore to.password
- the password to use to protect the KeyStore.
-
Builder
public Builder(java.io.OutputStream out, java.security.KeyStore.ProtectionParameter protectionParameter)
Base constructor for storing to an OutputStream using a protection parameter.- Parameters:
out
- OutputStream to write KeyStore to.protectionParameter
- the protection parameter to use to protect the KeyStore.
-
Builder
public Builder(java.io.InputStream in, char[] password)
Base constructor for reading a KeyStore from an InputStream using a password.- Parameters:
in
- InputStream to read the KeyStore from.password
- the password used to protect the KeyStore.
-
Builder
public Builder(java.io.InputStream in, java.security.KeyStore.ProtectionParameter protectionParameter)
Base constructor for reading a KeyStore from an InputStream using a password.- Parameters:
in
- InputStream to read the KeyStore from.protectionParameter
- the protection parameter used to protect the KeyStore.
-
-
Method Detail
-
withStorePBKDFConfig
public BCFKSLoadStoreParameter.Builder withStorePBKDFConfig(PBKDFConfig storeConfig)
Configure the PBKDF to use for protecting the KeyStore.- Parameters:
storeConfig
- the PBKDF config to use for protecting the KeyStore.- Returns:
- the current Builder instance.
-
withStoreEncryptionAlgorithm
public BCFKSLoadStoreParameter.Builder withStoreEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg)
Configure the encryption algorithm to use for protecting the KeyStore and its keys.- Parameters:
encAlg
- the PBKDF config to use for protecting the KeyStore and its keys.- Returns:
- the current Builder instance.
-
withStoreMacAlgorithm
public BCFKSLoadStoreParameter.Builder withStoreMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm macAlg)
Configure the MAC algorithm to use for protecting the KeyStore.- Parameters:
macAlg
- the PBKDF config to use for protecting the KeyStore.- Returns:
- the current Builder instance.
-
build
public BCFKSLoadStoreParameter build()
Build and return a BCFKSLoadStoreParameter.- Returns:
- a new BCFKSLoadStoreParameter.
-
-