Class PrivateKeyEncryptionContext
- java.lang.Object
-
- org.apache.sshd.common.config.keys.loader.PrivateKeyEncryptionContext
-
- All Implemented Interfaces:
Cloneable
,MutablePassword
,PasswordHolder
- Direct Known Subclasses:
OpenSSHKeyEncryptionContext
public class PrivateKeyEncryptionContext extends Object implements MutablePassword, Cloneable
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_CIPHER_MODE
-
Constructor Summary
Constructors Constructor Description PrivateKeyEncryptionContext()
PrivateKeyEncryptionContext(String algInfo)
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_CIPHER_MODE
public static final String DEFAULT_CIPHER_MODE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PrivateKeyEncryptionContext
public PrivateKeyEncryptionContext()
-
PrivateKeyEncryptionContext
public PrivateKeyEncryptionContext(String algInfo)
-
-
Method Detail
-
getCipherName
public String getCipherName()
-
setCipherName
public void setCipherName(String value)
-
getCipherType
public String getCipherType()
-
setCipherType
public void setCipherType(String value)
-
getCipherMode
public String getCipherMode()
-
setCipherMode
public void setCipherMode(String value)
-
getPassword
public String getPassword()
- Specified by:
getPassword
in interfacePasswordHolder
-
setPassword
public void setPassword(String value)
- Specified by:
setPassword
in interfaceMutablePassword
-
getInitVector
public byte[] getInitVector()
-
setInitVector
public void setInitVector(byte... values)
-
getPrivateKeyObfuscator
public PrivateKeyObfuscator getPrivateKeyObfuscator()
-
setPrivateKeyObfuscator
public void setPrivateKeyObfuscator(PrivateKeyObfuscator value)
-
resolvePrivateKeyObfuscator
public PrivateKeyObfuscator resolvePrivateKeyObfuscator()
-
registerPrivateKeyObfuscator
public static PrivateKeyObfuscator registerPrivateKeyObfuscator(PrivateKeyObfuscator o)
-
registerPrivateKeyObfuscator
public static PrivateKeyObfuscator registerPrivateKeyObfuscator(String cipherName, PrivateKeyObfuscator o)
-
unregisterPrivateKeyObfuscator
public static boolean unregisterPrivateKeyObfuscator(PrivateKeyObfuscator o)
-
unregisterPrivateKeyObfuscator
public static PrivateKeyObfuscator unregisterPrivateKeyObfuscator(String cipherName)
-
getRegisteredPrivateKeyObfuscator
public static final PrivateKeyObfuscator getRegisteredPrivateKeyObfuscator(String cipherName)
-
getRegisteredPrivateKeyObfuscatorCiphers
public static final NavigableSet<String> getRegisteredPrivateKeyObfuscatorCiphers()
-
getRegisteredPrivateKeyObfuscators
public static final List<PrivateKeyObfuscator> getRegisteredPrivateKeyObfuscators()
-
parseAlgorithmInfo
public PrivateKeyEncryptionContext parseAlgorithmInfo(String algInfo)
- Parameters:
algInfo
- The algorithm info - format:name-type-mode
- Returns:
- The updated context instance
- See Also:
parseAlgorithmInfo(PrivateKeyEncryptionContext, String)
-
clone
public PrivateKeyEncryptionContext clone()
-
parseAlgorithmInfo
public static final <C extends PrivateKeyEncryptionContext> C parseAlgorithmInfo(C context, String algInfo)
- Type Parameters:
C
- Generic context type- Parameters:
context
- ThePrivateKeyEncryptionContext
to 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)
-
-