|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.crypto.params.Argon2Parameters.Builder
Fluent builder for Argon2Parameters.
| Constructor Summary | |
Argon2Parameters.Builder()
Create a builder defaulting to Argon2Parameters.ARGON2_i. |
|
Argon2Parameters.Builder(int type)
Create a builder for the given Argon2 variant. |
|
| Method Summary | |
Argon2Parameters |
build()
Construct an immutable Argon2Parameters from the current builder state. |
void |
clear()
Zeroise sensitive state (salt, secret, additional) held by this builder. |
Argon2Parameters.Builder |
withAdditional(byte[] additional)
Set the optional additional/associated data. |
Argon2Parameters.Builder |
withBlockPool(Argon2BytesGenerator.BlockPool blockPool)
Provide a custom BlockPool for the generator to source its
working blocks from. |
Argon2Parameters.Builder |
withCharToByteConverter(CharToByteConverter converter)
Override the converter used to turn passwords into bytes. |
Argon2Parameters.Builder |
withIterations(int iterations)
Set the number of passes (time cost). |
Argon2Parameters.Builder |
withMemoryAsKB(int memory)
Set the memory cost expressed directly in KiB. |
Argon2Parameters.Builder |
withMemoryPowOfTwo(int memory)
Set the memory cost as a power of two: the resulting memory in KiB is . |
Argon2Parameters.Builder |
withParallelism(int parallelism)
Set the parallelism (number of lanes). |
Argon2Parameters.Builder |
withSalt(byte[] salt)
Set the salt. |
Argon2Parameters.Builder |
withSecret(byte[] secret)
Set the optional secret (key) value. |
Argon2Parameters.Builder |
withVersion(int version)
Set the Argon2 version. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Argon2Parameters.Builder()
Argon2Parameters.ARGON2_i.
public Argon2Parameters.Builder(int type)
type - one of Argon2Parameters.ARGON2_d, Argon2Parameters.ARGON2_i,
or Argon2Parameters.ARGON2_id.| Method Detail |
public Argon2Parameters.Builder withParallelism(int parallelism)
parallelism - the degree of parallelism, must be at least 1.
public Argon2Parameters.Builder withSalt(byte[] salt)
salt - salt bytes; may be null.
public Argon2Parameters.Builder withSecret(byte[] secret)
secret - secret bytes; may be null.
public Argon2Parameters.Builder withAdditional(byte[] additional)
additional - additional data bytes; may be null.
public Argon2Parameters.Builder withIterations(int iterations)
iterations - number of iterations, must be at least 1.
public Argon2Parameters.Builder withMemoryAsKB(int memory)
memory - memory in KiB; must be in .
java.lang.IllegalArgumentException - if the value is out of range.public Argon2Parameters.Builder withMemoryPowOfTwo(int memory)
memory - exponent; must be in .
java.lang.IllegalArgumentException - if the exponent is out of range.public Argon2Parameters.Builder withVersion(int version)
version - one of Argon2Parameters.ARGON2_VERSION_10 or Argon2Parameters.ARGON2_VERSION_13.
public Argon2Parameters.Builder withCharToByteConverter(CharToByteConverter converter)
PasswordConverter.UTF8.
converter - the character-to-byte converter to use.
public Argon2Parameters.Builder withBlockPool(Argon2BytesGenerator.BlockPool blockPool)
BlockPool for the generator to source its
working blocks from. Useful in high-throughput scenarios where the
cost of allocating fresh buffers per call dominates.
If null (the default) the generator creates a per-call FixedBlockPool.
public Argon2Parameters build()
Argon2Parameters from the current builder state.
public void clear()
|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||