C# Class Granados.Crypto.CipherFactory

Creates a cipher from given parameters
ファイルを表示 Open project: poderosaproject/poderosa

Public Methods

Method Description
AlgorithmToSSH2Name ( CipherAlgorithm algorithm ) : string
CreateCipher ( SSHProtocol protocol, CipherAlgorithm algorithm, byte key ) : Cipher
CreateCipher ( SSHProtocol protocol, CipherAlgorithm algorithm, byte key, byte iv ) : Cipher
GetBlockSize ( CipherAlgorithm algorithm ) : int

returns the block size from Algorithm in bytes

GetKeySize ( CipherAlgorithm algorithm ) : int

returns necessary key size from Algorithm in bytes

SSH2NameToAlgorithm ( string name ) : CipherAlgorithm

Method Details

AlgorithmToSSH2Name() public static method

public static AlgorithmToSSH2Name ( CipherAlgorithm algorithm ) : string
algorithm CipherAlgorithm
return string

CreateCipher() public static method

public static CreateCipher ( SSHProtocol protocol, CipherAlgorithm algorithm, byte key ) : Cipher
protocol SSHProtocol
algorithm CipherAlgorithm
key byte
return Cipher

CreateCipher() public static method

public static CreateCipher ( SSHProtocol protocol, CipherAlgorithm algorithm, byte key, byte iv ) : Cipher
protocol SSHProtocol
algorithm CipherAlgorithm
key byte
iv byte
return Cipher

GetBlockSize() public static method

returns the block size from Algorithm in bytes
public static GetBlockSize ( CipherAlgorithm algorithm ) : int
algorithm CipherAlgorithm
return int

GetKeySize() public static method

returns necessary key size from Algorithm in bytes
public static GetKeySize ( CipherAlgorithm algorithm ) : int
algorithm CipherAlgorithm
return int

SSH2NameToAlgorithm() public static method

public static SSH2NameToAlgorithm ( string name ) : CipherAlgorithm
name string
return CipherAlgorithm