public static class BCFKSLoadStoreParameter.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder()
Base constructor for creating a LoadStoreParameter for initializing a key store.
|
Builder(java.io.InputStream in,
BCFKSLoadStoreParameter.CertChainValidator validator)
Base constructor for reading a KeyStore from an InputStream using validation based on
encapsulated certificates in the KeyStore data.
|
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.InputStream in,
java.security.PublicKey sigKey)
Base constructor for reading a KeyStore from an InputStream using a public key for validation.
|
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.
|
Builder(java.io.OutputStream out,
java.security.PrivateKey sigKey)
Base constructor for storing to an OutputStream using a protection parameter.
|
| Modifier and Type | Method and Description |
|---|---|
BCFKSLoadStoreParameter |
build()
Build and return a BCFKSLoadStoreParameter.
|
BCFKSLoadStoreParameter.Builder |
withCertificates(java.security.cert.X509Certificate[] certs)
Add a valid certificate chain where certs[0] is the end-entity matching the
private key we are using to sign the key store.
|
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.
|
BCFKSLoadStoreParameter.Builder |
withStoreSignatureAlgorithm(BCFKSLoadStoreParameter.SignatureAlgorithm sigAlg)
Configure the signature algorithm to use for protecting the KeyStore.
|
public Builder()
public Builder(java.io.OutputStream out,
char[] password)
out - OutputStream to write KeyStore to.password - the password to use to protect the KeyStore.public Builder(java.io.OutputStream out,
java.security.KeyStore.ProtectionParameter protectionParameter)
out - OutputStream to write KeyStore to.protectionParameter - the protection parameter to use to protect the KeyStore.public Builder(java.io.OutputStream out,
java.security.PrivateKey sigKey)
out - OutputStream to write KeyStore to.sigKey - the key used to protect the integrity of the key store.public Builder(java.io.InputStream in,
java.security.PublicKey sigKey)
in - InputStream to load KeyStore to.sigKey - the public key parameter to used to verify the KeyStore.public Builder(java.io.InputStream in,
BCFKSLoadStoreParameter.CertChainValidator validator)
in - InputStream to load KeyStore to.validator - the certificate chain validator to check the signing certificates.public Builder(java.io.InputStream in,
char[] password)
in - InputStream to read the KeyStore from.password - the password used to protect the KeyStore.public Builder(java.io.InputStream in,
java.security.KeyStore.ProtectionParameter protectionParameter)
in - InputStream to read the KeyStore from.protectionParameter - the protection parameter used to protect the KeyStore.public BCFKSLoadStoreParameter.Builder withStorePBKDFConfig(PBKDFConfig storeConfig)
storeConfig - the PBKDF config to use for protecting the KeyStore.public BCFKSLoadStoreParameter.Builder withStoreEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg)
encAlg - the PBKDF config to use for protecting the KeyStore and its keys.public BCFKSLoadStoreParameter.Builder withStoreMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm macAlg)
macAlg - the PBKDF config to use for protecting the KeyStore.public BCFKSLoadStoreParameter.Builder withCertificates(java.security.cert.X509Certificate[] certs)
certs - an array of X509 certificates.public BCFKSLoadStoreParameter.Builder withStoreSignatureAlgorithm(BCFKSLoadStoreParameter.SignatureAlgorithm sigAlg)
sigAlg - the signature config to use for protecting the KeyStore.public BCFKSLoadStoreParameter build()