Class V1PuTTYSecretKeyDerivationFunction
- java.lang.Object
-
- net.schmizz.sshj.userauth.keyprovider.V1PuTTYSecretKeyDerivationFunction
-
- All Implemented Interfaces:
PuTTYSecretKeyDerivationFunction
class V1PuTTYSecretKeyDerivationFunction extends java.lang.Object implements PuTTYSecretKeyDerivationFunction
PuTTY Key Derivation Function supporting Version 1 and 2 Key files with historical SHA-1 key derivation
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
DIGEST_ALGORITHM
private static java.lang.String
SECRET_KEY_ALGORITHM
-
Constructor Summary
Constructors Constructor Description V1PuTTYSecretKeyDerivationFunction()
-
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 java.security.MessageDigest
getMessageDigest()
-
-
-
Field Detail
-
SECRET_KEY_ALGORITHM
private static final java.lang.String SECRET_KEY_ALGORITHM
- See Also:
- Constant Field Values
-
DIGEST_ALGORITHM
private static final java.lang.String DIGEST_ALGORITHM
- See Also:
- Constant Field Values
-
-
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
-
getMessageDigest
private java.security.MessageDigest getMessageDigest()
-
-