Class PrivateKeyEncryptionContext
java.lang.Object
org.apache.sshd.common.config.keys.loader.PrivateKeyEncryptionContext
- All Implemented Interfaces:
Cloneable,MutablePassword,PasswordHolder
- Direct Known Subclasses:
OpenSSHKeyEncryptionContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate Stringstatic final Stringprivate byte[]private PrivateKeyObfuscatorprivate static final Map<String, PrivateKeyObfuscator> private String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanbyte[]static final PrivateKeyObfuscatorgetRegisteredPrivateKeyObfuscator(String cipherName) static final NavigableSet<String> static final List<PrivateKeyObfuscator> inthashCode()static final <C extends PrivateKeyEncryptionContext>
CinitializeObfuscator(C context, PrivateKeyObfuscator o, String password) static final PrivateKeyEncryptionContextnewPrivateKeyEncryptionContext(PrivateKeyObfuscator o, String password) static final <C extends PrivateKeyEncryptionContext>
CparseAlgorithmInfo(C context, String algInfo) parseAlgorithmInfo(String algInfo) static PrivateKeyObfuscatorregisterPrivateKeyObfuscator(String cipherName, PrivateKeyObfuscator o) static PrivateKeyObfuscatorvoidsetCipherMode(String value) voidsetCipherName(String value) voidsetCipherType(String value) voidsetInitVector(byte... values) voidsetPassword(String value) voidtoString()static PrivateKeyObfuscatorunregisterPrivateKeyObfuscator(String cipherName) static boolean
-
Field Details
-
DEFAULT_CIPHER_MODE
- See Also:
-
OBFUSCATORS
-
cipherName
-
cipherType
-
cipherMode
-
password
-
initVector
private byte[] initVector -
obfuscator
-
-
Constructor Details
-
PrivateKeyEncryptionContext
public PrivateKeyEncryptionContext() -
PrivateKeyEncryptionContext
-
-
Method Details
-
getCipherName
-
setCipherName
-
getCipherType
-
setCipherType
-
getCipherMode
-
setCipherMode
-
getPassword
- Specified by:
getPasswordin interfacePasswordHolder
-
setPassword
- Specified by:
setPasswordin interfaceMutablePassword
-
getInitVector
public byte[] getInitVector() -
setInitVector
public void setInitVector(byte... values) -
getPrivateKeyObfuscator
-
setPrivateKeyObfuscator
-
resolvePrivateKeyObfuscator
-
registerPrivateKeyObfuscator
-
registerPrivateKeyObfuscator
public static PrivateKeyObfuscator registerPrivateKeyObfuscator(String cipherName, PrivateKeyObfuscator o) -
unregisterPrivateKeyObfuscator
-
unregisterPrivateKeyObfuscator
-
getRegisteredPrivateKeyObfuscator
-
getRegisteredPrivateKeyObfuscatorCiphers
-
getRegisteredPrivateKeyObfuscators
-
parseAlgorithmInfo
- Parameters:
algInfo- The algorithm info - format:name-type-mode- Returns:
- The updated context instance
- See Also:
-
clone
-
hashCode
public int hashCode() -
equals
-
toString
-
parseAlgorithmInfo
public static final <C extends PrivateKeyEncryptionContext> C parseAlgorithmInfo(C context, String algInfo) - Type Parameters:
C- Generic context type- Parameters:
context- ThePrivateKeyEncryptionContextto updatealgInfo- The algorithm info - format:<I>name</I>-<I>type</I>-<I>mode</I>- Returns:
- The updated context
-
newPrivateKeyEncryptionContext
public static final PrivateKeyEncryptionContext newPrivateKeyEncryptionContext(PrivateKeyObfuscator o, String password) -
initializeObfuscator
public static final <C extends PrivateKeyEncryptionContext> C initializeObfuscator(C context, PrivateKeyObfuscator o, String password)
-