Table of Contents

Class Cipher

Namespace
Renci.SshNet.Security.Cryptography
Assembly
Renci.SshNet.dll

Base class for cipher implementation.

public abstract class Cipher

Inheritance

Derived

Inherited Members

Properties

MinimumSize

Gets the minimum data size.

public abstract byte MinimumSize { get; }

Property Value

byte

TagSize

Gets the size of the authentication tag for ciphers which implement Authenticated Encryption (AE).

public virtual int TagSize { get; }

Property Value

int

Methods

Decrypt(byte[])

Decrypts the specified input.

public virtual byte[] Decrypt(byte[] input)

Parameters

input byte[]

The input.

Returns

byte[]

The decrypted data.

Decrypt(byte[], int, int)

Decrypts the specified input.

public abstract byte[] Decrypt(byte[] input, int offset, int length)

Parameters

input byte[]

The input.

offset int

The zero-based offset in input at which to begin decrypting.

length int

The number of bytes to decrypt from input.

Returns

byte[]

The decrypted data.

Decrypt(byte[], int, int, byte[], int)

Decrypts the specified input into a given buffer.

public virtual int Decrypt(byte[] input, int offset, int length, byte[] output, int outputOffset)

Parameters

input byte[]

The input.

offset int

The zero-based offset in input at which to begin decrypting.

length int

The number of bytes to decrypt from input.

output byte[]

The output buffer to write to.

outputOffset int

The zero-based offset in output at which to write decrypted output.

Returns

int

The number of bytes written to output.

Encrypt(byte[])

Encrypts the specified input.

public byte[] Encrypt(byte[] input)

Parameters

input byte[]

The input.

Returns

byte[]

Encrypted data.

Encrypt(byte[], int, int)

Encrypts the specified input.

public abstract byte[] Encrypt(byte[] input, int offset, int length)

Parameters

input byte[]

The input.

offset int

The zero-based offset in input at which to begin encrypting.

length int

The number of bytes to encrypt from input.

Returns

byte[]

The encrypted data.

Encrypt(byte[], int, int, byte[], int)

Encrypts the specified input into a given buffer.

public virtual int Encrypt(byte[] input, int offset, int length, byte[] output, int outputOffset)

Parameters

input byte[]

The input.

offset int

The zero-based offset in input at which to begin encrypting.

length int

The number of bytes to encrypt from input.

output byte[]

The output buffer to write to.

outputOffset int

The zero-based offset in output at which to write encrypted output.

Returns

int

The number of bytes written to output.