C# Class Renci.SshNet.Security.Cryptography.Ciphers.RsaCipher

Implements RSA cipher algorithm.
Inheritance: AsymmetricCipher
Mostra file Open project: sshnet/SSH.NET Class Usage Examples

Public Methods

Method Description
Decrypt ( byte data ) : byte[]

Decrypts the specified data.

Decrypt ( byte data, int offset, int length ) : byte[]

Decrypts the specified input.

Encrypt ( byte data, int offset, int length ) : byte[]

Encrypts the specified data.

RsaCipher ( RsaKey key ) : System

Initializes a new instance of the RsaCipher class.

Private Methods

Method Description
Transform ( byte data ) : byte[]
Transform ( byte data, int offset, int length ) : byte[]

Method Details

Decrypt() public method

Decrypts the specified data.
Only block type 01 or 02 are supported. Thrown when decrypted block type is not supported.
public Decrypt ( byte data ) : byte[]
data byte The data.
return byte[]

Decrypt() public method

Decrypts the specified input.
Only block type 01 or 02 are supported. Thrown when decrypted block type is not supported.
public Decrypt ( byte data, int offset, int length ) : byte[]
data byte The input.
offset int The zero-based offset in at which to begin decrypting.
length int The number of bytes to decrypt from .
return byte[]

Encrypt() public method

Encrypts the specified data.
public Encrypt ( byte data, int offset, int length ) : byte[]
data byte The data.
offset int The zero-based offset in at which to begin encrypting.
length int The number of bytes to encrypt from .
return byte[]

RsaCipher() public method

Initializes a new instance of the RsaCipher class.
public RsaCipher ( RsaKey key ) : System
key RsaKey The RSA key.
return System