Top Description Inners Fields Constructors Methods
org.bouncycastle.jcajce

public Class BCFKSLoadStoreParameter

extends BCLoadStoreParameter
Class Inheritance
Imports
java.io.InputStream, .OutputStream, java.security.KeyStore, org.bouncycastle.crypto.util.PBKDF2Config, .PBKDFConfig

LoadStoreParameter to allow configuring of the PBKDF used to generate encryption keys for use in the keystore.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static enum
public static enum

Field Summary

Modifier and TypeField and Description
private final BCFKSLoadStoreParameter.EncryptionAlgorithm
private final BCFKSLoadStoreParameter.MacAlgorithm
private final PBKDFConfig

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public BCFKSLoadStoreParameter.EncryptionAlgorithm

Returns:

the encryption algorithm to use.
getStoreEncryptionAlgorithm
()

Return encryption algorithm used to secure the store and its entries.

public BCFKSLoadStoreParameter.MacAlgorithm

Returns:

the encryption algorithm to use.
getStoreMacAlgorithm
()

Return encryption algorithm used to secure the store and its entries.

public PBKDFConfig

Returns:

the PBKDF to use for deriving HMAC and store encryption keys.
getStorePBKDFConfig
()

Return the PBKDF used for generating the HMAC and store encryption keys.

Inherited from org.bouncycastle.jcajce.BCLoadStoreParameter:
getInputStreamgetOutputStreamgetProtectionParameter

Field Detail

encAlgback to summary
private final BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg
macAlgback to summary
private final BCFKSLoadStoreParameter.MacAlgorithm macAlg
storeConfigback to summary
private final PBKDFConfig storeConfig

Constructor Detail

BCFKSLoadStoreParameterback to summary
private BCFKSLoadStoreParameter(InputStream in, OutputStream out, PBKDFConfig storeConfig, KeyStore.ProtectionParameter protectionParameter, BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg, BCFKSLoadStoreParameter.MacAlgorithm macAlg)

Method Detail

getStoreEncryptionAlgorithmback to summary
public BCFKSLoadStoreParameter.EncryptionAlgorithm getStoreEncryptionAlgorithm()

Return encryption algorithm used to secure the store and its entries.

Returns:BCFKSLoadStoreParameter.EncryptionAlgorithm

the encryption algorithm to use.

getStoreMacAlgorithmback to summary
public BCFKSLoadStoreParameter.MacAlgorithm getStoreMacAlgorithm()

Return encryption algorithm used to secure the store and its entries.

Returns:BCFKSLoadStoreParameter.MacAlgorithm

the encryption algorithm to use.

getStorePBKDFConfigback to summary
public PBKDFConfig getStorePBKDFConfig()

Return the PBKDF used for generating the HMAC and store encryption keys.

Returns:PBKDFConfig

the PBKDF to use for deriving HMAC and store encryption keys.

org.bouncycastle.jcajce back to summary

public Class BCFKSLoadStoreParameter.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private BCFKSLoadStoreParameter.EncryptionAlgorithm
private final InputStream
private BCFKSLoadStoreParameter.MacAlgorithm
private final OutputStream
private final KeyStore.ProtectionParameter
private PBKDFConfig

Constructor Summary

AccessConstructor and Description
public
Builder()

Base constructor for creating a LoadStoreParameter for initializing a key store.

public
Builder(OutputStream
OutputStream to write KeyStore to.
out
,
char[]
the password to use to protect the KeyStore.
password
)

Base constructor for storing to an OutputStream using a password.

public
Builder(OutputStream
OutputStream to write KeyStore to.
out
,
KeyStore.ProtectionParameter
the protection parameter to use to protect the KeyStore.
protectionParameter
)

Base constructor for storing to an OutputStream using a protection parameter.

public
Builder(InputStream
InputStream to read the KeyStore from.
in
,
char[]
the password used to protect the KeyStore.
password
)

Base constructor for reading a KeyStore from an InputStream using a password.

public
Builder(InputStream
InputStream to read the KeyStore from.
in
,
KeyStore.ProtectionParameter
the protection parameter used to protect the KeyStore.
protectionParameter
)

Base constructor for reading a KeyStore from an InputStream using a password.

Method Summary

Modifier and TypeMethod and Description
public BCFKSLoadStoreParameter

Returns:

a new BCFKSLoadStoreParameter.
build
()

Build and return a BCFKSLoadStoreParameter.

public BCFKSLoadStoreParameter.Builder

Returns:

the current Builder instance.
withStoreEncryptionAlgorithm
(BCFKSLoadStoreParameter.EncryptionAlgorithm
the PBKDF config to use for protecting the KeyStore and its keys.
encAlg
)

Configure the encryption algorithm to use for protecting the KeyStore and its keys.

public BCFKSLoadStoreParameter.Builder

Returns:

the current Builder instance.
withStoreMacAlgorithm
(BCFKSLoadStoreParameter.MacAlgorithm
the PBKDF config to use for protecting the KeyStore.
macAlg
)

Configure the MAC algorithm to use for protecting the KeyStore.

public BCFKSLoadStoreParameter.Builder

Returns:

the current Builder instance.
withStorePBKDFConfig
(PBKDFConfig
the PBKDF config to use for protecting the KeyStore.
storeConfig
)

Configure the PBKDF to use for protecting the KeyStore.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

encAlgback to summary
private BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg
inback to summary
private final InputStream in
macAlgback to summary
private BCFKSLoadStoreParameter.MacAlgorithm macAlg
outback to summary
private final OutputStream out
protectionParameterback to summary
private final KeyStore.ProtectionParameter protectionParameter
storeConfigback to summary
private PBKDFConfig storeConfig

Constructor Detail

Builderback to summary
public Builder()

Base constructor for creating a LoadStoreParameter for initializing a key store.

Builderback to summary
public Builder(OutputStream out, char[] password)

Base constructor for storing to an OutputStream using a password.

Parameters
out:OutputStream

OutputStream to write KeyStore to.

password:char[]

the password to use to protect the KeyStore.

Builderback to summary
public Builder(OutputStream out, KeyStore.ProtectionParameter protectionParameter)

Base constructor for storing to an OutputStream using a protection parameter.

Parameters
out:OutputStream

OutputStream to write KeyStore to.

protectionParameter:KeyStore.ProtectionParameter

the protection parameter to use to protect the KeyStore.

Builderback to summary
public Builder(InputStream in, char[] password)

Base constructor for reading a KeyStore from an InputStream using a password.

Parameters
in:InputStream

InputStream to read the KeyStore from.

password:char[]

the password used to protect the KeyStore.

Builderback to summary
public Builder(InputStream in, KeyStore.ProtectionParameter protectionParameter)

Base constructor for reading a KeyStore from an InputStream using a password.

Parameters
in:InputStream

InputStream to read the KeyStore from.

protectionParameter:KeyStore.ProtectionParameter

the protection parameter used to protect the KeyStore.

Method Detail

buildback to summary
public BCFKSLoadStoreParameter build()

Build and return a BCFKSLoadStoreParameter.

Returns:BCFKSLoadStoreParameter

a new BCFKSLoadStoreParameter.

withStoreEncryptionAlgorithmback to summary
public BCFKSLoadStoreParameter.Builder withStoreEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg)

Configure the encryption algorithm to use for protecting the KeyStore and its keys.

Parameters
encAlg:BCFKSLoadStoreParameter.EncryptionAlgorithm

the PBKDF config to use for protecting the KeyStore and its keys.

Returns:BCFKSLoadStoreParameter.Builder

the current Builder instance.

withStoreMacAlgorithmback to summary
public BCFKSLoadStoreParameter.Builder withStoreMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm macAlg)

Configure the MAC algorithm to use for protecting the KeyStore.

Parameters
macAlg:BCFKSLoadStoreParameter.MacAlgorithm

the PBKDF config to use for protecting the KeyStore.

Returns:BCFKSLoadStoreParameter.Builder

the current Builder instance.

withStorePBKDFConfigback to summary
public BCFKSLoadStoreParameter.Builder withStorePBKDFConfig(PBKDFConfig storeConfig)

Configure the PBKDF to use for protecting the KeyStore.

Parameters
storeConfig:PBKDFConfig

the PBKDF config to use for protecting the KeyStore.

Returns:BCFKSLoadStoreParameter.Builder

the current Builder instance.

org.bouncycastle.jcajce back to summary

public final Enum BCFKSLoadStoreParameter.EncryptionAlgorithm

extends Enum<BCFKSLoadStoreParameter.EncryptionAlgorithm>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final BCFKSLoadStoreParameter.EncryptionAlgorithm
public static final BCFKSLoadStoreParameter.EncryptionAlgorithm

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BCFKSLoadStoreParameter.EncryptionAlgorithm
public static BCFKSLoadStoreParameter.EncryptionAlgorithm[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AES256_CCMback to summary
public static final BCFKSLoadStoreParameter.EncryptionAlgorithm AES256_CCM
AES256_KWPback to summary
public static final BCFKSLoadStoreParameter.EncryptionAlgorithm AES256_KWP

Constructor Detail

EncryptionAlgorithmback to summary
private EncryptionAlgorithm()

Method Detail

valueOfback to summary
public static BCFKSLoadStoreParameter.EncryptionAlgorithm valueOf(String name)
valuesback to summary
public static BCFKSLoadStoreParameter.EncryptionAlgorithm[] values()
org.bouncycastle.jcajce back to summary

public final Enum BCFKSLoadStoreParameter.MacAlgorithm

extends Enum<BCFKSLoadStoreParameter.MacAlgorithm>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final BCFKSLoadStoreParameter.MacAlgorithm
public static final BCFKSLoadStoreParameter.MacAlgorithm

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BCFKSLoadStoreParameter.MacAlgorithm
public static BCFKSLoadStoreParameter.MacAlgorithm[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

HmacSHA3_512back to summary
public static final BCFKSLoadStoreParameter.MacAlgorithm HmacSHA3_512
HmacSHA512back to summary
public static final BCFKSLoadStoreParameter.MacAlgorithm HmacSHA512

Constructor Detail

MacAlgorithmback to summary
private MacAlgorithm()

Method Detail

valueOfback to summary
public static BCFKSLoadStoreParameter.MacAlgorithm valueOf(String name)
valuesback to summary
public static BCFKSLoadStoreParameter.MacAlgorithm[] values()