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 String
private String
private String
static final String
private byte[]
private PrivateKeyObfuscator
private static final Map
<String, PrivateKeyObfuscator> private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
byte[]
static final PrivateKeyObfuscator
getRegisteredPrivateKeyObfuscator
(String cipherName) static final NavigableSet
<String> static final List
<PrivateKeyObfuscator> int
hashCode()
static final <C extends PrivateKeyEncryptionContext>
CinitializeObfuscator
(C context, PrivateKeyObfuscator o, String password) static final PrivateKeyEncryptionContext
newPrivateKeyEncryptionContext
(PrivateKeyObfuscator o, String password) static final <C extends PrivateKeyEncryptionContext>
CparseAlgorithmInfo
(C context, String algInfo) parseAlgorithmInfo
(String algInfo) static PrivateKeyObfuscator
registerPrivateKeyObfuscator
(String cipherName, PrivateKeyObfuscator o) static PrivateKeyObfuscator
void
setCipherMode
(String value) void
setCipherName
(String value) void
setCipherType
(String value) void
setInitVector
(byte... values) void
setPassword
(String value) void
toString()
static PrivateKeyObfuscator
unregisterPrivateKeyObfuscator
(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:
getPassword
in interfacePasswordHolder
-
setPassword
- Specified by:
setPassword
in 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
- 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)
-