Class OpenSSHParserContext
- java.lang.Object
-
- org.apache.sshd.common.config.keys.loader.openssh.OpenSSHParserContext
-
- All Implemented Interfaces:
OpenSSHKeyDecryptor
public class OpenSSHParserContext extends java.lang.Object implements OpenSSHKeyDecryptor
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringcipherNamestatic java.util.function.Predicate<java.lang.String>IS_NONE_CIPHERprivate OpenSSHKdfOptionskdfOptionsstatic java.lang.StringNONE_CIPHER
-
Constructor Summary
Constructors Constructor Description OpenSSHParserContext()OpenSSHParserContext(java.lang.String cipherName, OpenSSHKdfOptions kdfOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decodePrivateKeyBytes(SessionContext session, NamedResource resourceKey, java.lang.String cipherName, byte[] privateDataBytes, java.lang.String password)java.lang.StringgetCipherName()OpenSSHKdfOptionsgetKdfOptions()booleanisEncrypted()voidsetCipherName(java.lang.String cipherName)voidsetKdfOptions(OpenSSHKdfOptions kdfOptions)java.lang.StringtoString()
-
-
-
Field Detail
-
NONE_CIPHER
public static final java.lang.String NONE_CIPHER
- See Also:
- Constant Field Values
-
IS_NONE_CIPHER
public static final java.util.function.Predicate<java.lang.String> IS_NONE_CIPHER
-
cipherName
private java.lang.String cipherName
-
kdfOptions
private OpenSSHKdfOptions kdfOptions
-
-
Constructor Detail
-
OpenSSHParserContext
public OpenSSHParserContext()
-
OpenSSHParserContext
public OpenSSHParserContext(java.lang.String cipherName, OpenSSHKdfOptions kdfOptions)
-
-
Method Detail
-
isEncrypted
public boolean isEncrypted()
- Specified by:
isEncryptedin interfaceOpenSSHKeyDecryptor
-
getCipherName
public java.lang.String getCipherName()
-
setCipherName
public void setCipherName(java.lang.String cipherName)
-
getKdfOptions
public OpenSSHKdfOptions getKdfOptions()
-
setKdfOptions
public void setKdfOptions(OpenSSHKdfOptions kdfOptions)
-
decodePrivateKeyBytes
public byte[] decodePrivateKeyBytes(SessionContext session, NamedResource resourceKey, java.lang.String cipherName, byte[] privateDataBytes, java.lang.String password) throws java.io.IOException, java.security.GeneralSecurityException
- Specified by:
decodePrivateKeyBytesin interfaceOpenSSHKeyDecryptor- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-