public interface PGPS2KCalculator
S2K specifier (currently
Argon2, RFC 9580 sec. 3.7.1.4).
This is the operator-level abstraction for the one part of the OpenPGP string-to-key process that is
not expressible through a PGPDigestCalculator: a memory-hard KDF. Concrete implementations live
in the .bc and .jcajce operator subpackages so that the top-level operator package does
not depend on a particular crypto provider.
| Modifier and Type | Method and Description |
|---|---|
int |
getType()
Return the algorithm type
|
byte[] |
makeKey(char[] passPhrase,
S2K s2k,
int keyLen)
Derive
keyLen bytes from the supplied passphrase using the parameters carried by the given
Argon2 S2K specifier. |
int getType()
byte[] makeKey(char[] passPhrase,
S2K s2k,
int keyLen)
throws PGPException
keyLen bytes from the supplied passphrase using the parameters carried by the given
Argon2 S2K specifier.passPhrase - the passphrase.s2k - an S2K.ARGON_2 S2K carrying the salt, passes, parallelism and memory size.keyLen - the number of key bytes to produce.PGPException - on error.