Class V3PuTTYSecretKeyDerivationFunction
- java.lang.Object
-
- net.schmizz.sshj.userauth.keyprovider.V3PuTTYSecretKeyDerivationFunction
-
- All Implemented Interfaces:
PuTTYSecretKeyDerivationFunction
class V3PuTTYSecretKeyDerivationFunction extends java.lang.Object implements PuTTYSecretKeyDerivationFunction
PuTTY Key Derivation Function supporting Version 3 Key files with Argon2 Key Derivation using Bouncy Castle
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>
headers
private static int
KEY_LENGTH
private static java.lang.String
SECRET_KEY_ALGORITHM
-
Constructor Summary
Constructors Constructor Description V3PuTTYSecretKeyDerivationFunction(java.util.Map<java.lang.String,java.lang.String> headers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.crypto.SecretKey
deriveSecretKey(char[] passphrase)
Derive Secret Key from provided passphrase charactersprivate int
getAlgorithmType()
private org.bouncycastle.crypto.params.Argon2Parameters
getParameters()
-
-
-
Field Detail
-
SECRET_KEY_ALGORITHM
private static final java.lang.String SECRET_KEY_ALGORITHM
- See Also:
- Constant Field Values
-
KEY_LENGTH
private static final int KEY_LENGTH
- See Also:
- Constant Field Values
-
headers
private final java.util.Map<java.lang.String,java.lang.String> headers
-
-
Method Detail
-
deriveSecretKey
public javax.crypto.SecretKey deriveSecretKey(char[] passphrase)
Derive Secret Key from provided passphrase characters- Specified by:
deriveSecretKey
in interfacePuTTYSecretKeyDerivationFunction
- Parameters:
passphrase
- Passphrase characters required- Returns:
- Derived Secret Key
-
getParameters
private org.bouncycastle.crypto.params.Argon2Parameters getParameters()
-
getAlgorithmType
private int getAlgorithmType()
-
-