public class BcPGPS2KCalculator extends java.lang.Object implements PGPS2KCalculator
PGPS2KCalculator backed by the lightweight Argon2BytesGenerator. The cost parameters
are bounded by the caller (PGPUtil.makeKeyFromPassPhrase) before this is invoked.| Constructor and Description |
|---|
BcPGPS2KCalculator() |
| 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. |
public int getType()
PGPS2KCalculatorgetType in interface PGPS2KCalculatorpublic byte[] makeKey(char[] passPhrase,
S2K s2k,
int keyLen)
throws PGPException
PGPS2KCalculatorkeyLen bytes from the supplied passphrase using the parameters carried by the given
Argon2 S2K specifier.makeKey in interface PGPS2KCalculatorpassPhrase - 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.