Top Description Fields Constructors Methods
org.apache.sshd.common.config.keys.writer.openssh

public Class OpenSSHKeyEncryptionContext

extends PrivateKeyEncryptionContext
Class Inheritance
Imports
org.apache.sshd.common.config.keys.loader.PrivateKeyEncryptionContext, org.apache.sshd.common.util.ValidateUtils

A PrivateKeyEncryptionContext for use with a OpenSSHKeyPairResourceWriter.

Field Summary

Modifier and TypeField and Description
public static final String
public static final int
DEFAULT_KDF_ROUNDS

Default number of bcrypt KDF rounds to apply.

private int
Inherited from org.apache.sshd.common.config.keys.loader.PrivateKeyEncryptionContext:
DEFAULT_CIPHER_MODE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String

Returns:

the cipher's factory name.
getCipherFactoryName
()

public String
public int

Returns:

the default number of KDF rounds, >= DEFAULT_KDF_ROUNDS
getKdfRounds
()

Retrieves the number of KDF rounds to apply.

public void
public void
setKdfRounds(int
number of rounds to apply
rounds
)

Sets the number of KDF rounds to apply.

Inherited from org.apache.sshd.common.config.keys.loader.PrivateKeyEncryptionContext:
cloneequalsgetCipherModegetCipherTypegetInitVectorgetPasswordgetPrivateKeyObfuscatorgetRegisteredPrivateKeyObfuscatorgetRegisteredPrivateKeyObfuscatorCiphersgetRegisteredPrivateKeyObfuscatorshashCodeinitializeObfuscatornewPrivateKeyEncryptionContextparseAlgorithmInfoparseAlgorithmInforegisterPrivateKeyObfuscatorregisterPrivateKeyObfuscatorresolvePrivateKeyObfuscatorsetCipherModesetCipherTypesetInitVectorsetPasswordsetPrivateKeyObfuscatortoStringunregisterPrivateKeyObfuscatorunregisterPrivateKeyObfuscator

Field Detail

AESback to summary
public static final String AES
DEFAULT_KDF_ROUNDSback to summary
public static final int DEFAULT_KDF_ROUNDS

Default number of bcrypt KDF rounds to apply.

kdfRoundsback to summary
private int kdfRounds

Constructor Detail

OpenSSHKeyEncryptionContextback to summary
public OpenSSHKeyEncryptionContext()

Method Detail

getCipherFactoryNameback to summary
protected String getCipherFactoryName()
Returns:String

the cipher's factory name.

getCipherNameback to summary
public String getCipherName()

Overrides org.apache.sshd.common.config.keys.loader.PrivateKeyEncryptionContext.getCipherName.

Annotations
@Override
getKdfRoundsback to summary
public int getKdfRounds()

Retrieves the number of KDF rounds to apply.

Returns:int

the default number of KDF rounds, >= DEFAULT_KDF_ROUNDS

setCipherNameback to summary
public void setCipherName(String value)

Overrides org.apache.sshd.common.config.keys.loader.PrivateKeyEncryptionContext.setCipherName.

Annotations
@Override
setKdfRoundsback to summary
public void setKdfRounds(int rounds)

Sets the number of KDF rounds to apply. If smaller than the DEFAULT_KDF_ROUNDS, set that default.

Parameters
rounds:int

number of rounds to apply