public final class Argon2Helper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Argon2Helper.IterationLogger
Logger for the iteration tests.
|
static class |
Argon2Helper.NoopLogger
Logs nothing.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
findIterations(Argon2 argon2,
long maxMillisecs,
int memory,
int parallelism)
Finds the number of iterations so that the hash function takes at most the given number of milliseconds.
|
static int |
findIterations(Argon2 argon2,
long maxMillisecs,
int memory,
int parallelism,
Argon2Helper.IterationLogger logger)
Finds the number of iterations so that the hash function takes at most the given number of milliseconds.
|
public static int findIterations(Argon2 argon2, long maxMillisecs, int memory, int parallelism)
argon2 - Argon2 instance.maxMillisecs - Maximum number of milliseconds the hash function must take.memory - Memory. See Argon2.hash(int, int, int, char[]).parallelism - Parallelism. See Argon2.hash(int, int, int, char[]).public static int findIterations(Argon2 argon2, long maxMillisecs, int memory, int parallelism, Argon2Helper.IterationLogger logger)
argon2 - Argon2 instance.maxMillisecs - Maximum number of milliseconds the hash function must take.memory - Memory. See Argon2.hash(int, int, int, char[]).parallelism - Parallelism. See Argon2.hash(int, int, int, char[]).logger - Logger which gets called with the runtime of the tested iteration steps.