public static final class EncryptionProtocolConfig.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
EncryptionProtocolConfig.Builder |
authenticatedEncryption(AuthenticatedEncryption authenticatedEncryption)
Set your own implementation of
AuthenticatedEncryption. |
EncryptionProtocolConfig |
build()
Create new config instance
|
EncryptionProtocolConfig.Builder |
compressor(at.favre.lib.armadillo.Compressor compressor)
Set compressor to be used before encryption.
|
EncryptionProtocolConfig.Builder |
dataObfuscatorFactory(DataObfuscator.Factory dataObfuscatorFactory)
Set your own data obfuscation implementation.
|
EncryptionProtocolConfig.Builder |
keyStrength(int keyStrength)
Set the key length for the symmetric encryption.
|
EncryptionProtocolConfig.Builder |
keyStretchingFunction(KeyStretchingFunction keyStretchingFunction)
Set a different key derivation function for provided password.
|
EncryptionProtocolConfig.Builder |
protocolVersion(int protocolVersion)
A custom crypto protocol version can be set, to be able to migrate the data.
|
public EncryptionProtocolConfig.Builder protocolVersion(int protocolVersion)
The protocol version will be used as additional associated data with the authenticated encryption.
protocolVersion - to persist with the datapublic EncryptionProtocolConfig.Builder authenticatedEncryption(AuthenticatedEncryption authenticatedEncryption)
AuthenticatedEncryption.
Only set if you know what you are doing.
authenticatedEncryption - to be usedpublic EncryptionProtocolConfig.Builder keyStrength(int keyStrength)
Currently there are 2 options:
Note: Usually there is no real advantage to set it to VERY HIGH as HIGH (128 bit key length) is fully secure for the foreseeable future. VERY HIGH only adds more security margin for possible quantum computer attacks (but if you are a user which is threatened by these kinds of attacks you probably require higher degrees af protection)
keyStrength - HIGH (default) or VERY HIGHpublic EncryptionProtocolConfig.Builder keyStretchingFunction(KeyStretchingFunction keyStretchingFunction)
If you want to disable the key stretching feature you might use FastKeyStretcher here.
keyStretchingFunction - to be usedpublic EncryptionProtocolConfig.Builder dataObfuscatorFactory(DataObfuscator.Factory dataObfuscatorFactory)
Only set if you know what you are doing.
dataObfuscatorFactory - that creates a obfuscator with given keypublic EncryptionProtocolConfig.Builder compressor(at.favre.lib.armadillo.Compressor compressor)
compressor - to setpublic EncryptionProtocolConfig build()