Top Methods
org.apache.sshd.common.config.keys.loader

public Interface PrivateKeyObfuscator

Known Direct Implementers
org.apache.sshd.common.config.keys.loader.AbstractPrivateKeyObfuscator
Imports
java.io.IOException, java.security.GeneralSecurityException, java.util.List

Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public <
Appendable generic type
A extends Appendable
>
A

Returns:

Same appendable instance
appendPrivateKeyEncryptionContext
(A
The Appendable instance to update
sb
,
PrivateKeyEncryptionContext encContext)

public byte[]

Returns:

The result of applying the cipher to the original bytes
applyPrivateKeyCipher
(byte[]
Original bytes
bytes
,
PrivateKeyEncryptionContext
The encryption context
encContext
,
boolean
If true then encrypt the original bytes, otherwise decrypt them
encryptIt
)

public byte[]

Returns:

An initialization vector suitable to the specified context
generateInitializationVector
(PrivateKeyEncryptionContext
The encryption context
encContext
)

public String

Returns:

Basic cipher used to obfuscate
getCipherName
()

public List<Integer>

Returns:

A List of the supported key sizes - Note: every call returns a and un-modifiable instance.
getSupportedKeySizes
()

Method Detail

appendPrivateKeyEncryptionContextback to summary
public <A extends Appendable> A appendPrivateKeyEncryptionContext(A sb, PrivateKeyEncryptionContext encContext) throws IOException
Parameters
<A>
Appendable generic type
sb:A

The Appendable instance to update

Returns:A

Same appendable instance

applyPrivateKeyCipherback to summary
public byte[] applyPrivateKeyCipher(byte[] bytes, PrivateKeyEncryptionContext encContext, boolean encryptIt) throws IOException, GeneralSecurityException
Parameters
bytes:byte[]

Original bytes

encContext:PrivateKeyEncryptionContext

The encryption context

encryptIt:boolean

If true then encrypt the original bytes, otherwise decrypt them

Returns:byte[]

The result of applying the cipher to the original bytes

Exceptions
IOException:
If malformed input
GeneralSecurityException:
If cannot encrypt/decrypt
generateInitializationVectorback to summary
public byte[] generateInitializationVector(PrivateKeyEncryptionContext encContext) throws GeneralSecurityException
Parameters
encContext:PrivateKeyEncryptionContext

The encryption context

Returns:byte[]

An initialization vector suitable to the specified context

getCipherNameback to summary
public String getCipherName()
Returns:String

Basic cipher used to obfuscate

getSupportedKeySizesback to summary
public List<Integer> getSupportedKeySizes()
Returns:List<Integer>

A List of the supported key sizes - Note: every call returns a and un-modifiable instance.