Interface PGPS2KCalculator
- All Known Implementing Classes:
BcPGPS2KCalculator, JcePGPS2KCalculator
public interface PGPS2KCalculator
Derives a key from a passphrase for a memory-hard
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.
-
Method Summary
-
Method Details
-
getType
int getType()Return the algorithm type -
makeKey
DerivekeyLenbytes from the supplied passphrase using the parameters carried by the givenArgon2S2K specifier.- Parameters:
passPhrase- the passphrase.s2k- anS2K.ARGON_2S2K carrying the salt, passes, parallelism and memory size.keyLen- the number of key bytes to produce.- Returns:
- the derived key.
- Throws:
PGPException- on error.
-