Class: Net::SSH::Transport::OSSL::CipherFactory

Class | Net::SSH::Transport::OSSL::CipherFactory
In: | lib/net/ssh/transport/ossl/cipher-factory.rb
Parent: | Object

Implements a factory of OpenSSL cipher algorithms.

### Methods

get get_lengths new

### Attributes

identity_cipher | [W] | The accessor for setting the identity cipher implementation to use.

### Public Class methods

new( cipher_map )

Create a new CipherFactory instance that uses the given Hash-like to convert SSH2 cipher algorithm names to OpenSSL cipher algorithm names.

### Public Instance methods

get( name, iv=nil, key=nil, shared=nil, hash=nil, digester=nil, encrypt=false )

Retrieves a new instance of the named algorithm. The new instance will be initialized using an iv and key generated from the given iv, key, shared, hash and digester values. Additionally, the cipher will be put into encryption or decryption mode, based on the value of the `encrypt` parameter.

get_lengths( name )

Returns a two-element array containing the [ key-length, block-size ] for the named cipher algorithm. If the cipher algorithm is unknown, or is "none", 0 is returned for both elements of the tuple.

[Validate]