Table of Contents

Class Arc4Cipher

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

Implements ARCH4 cipher algorithm.

public sealed class Arc4Cipher : StreamCipher

Inheritance

Inherited Members

Constructors

Arc4Cipher(byte[], bool)

Initializes a new instance of the Renci.SshNet.Security.Cryptography.Ciphers.Arc4Cipher class.

public Arc4Cipher(byte[] key, bool dischargeFirstBytes)

Parameters

key byte[]

The key.

dischargeFirstBytes bool

if set to true will disharged first 1536 bytes.

Exceptions

ArgumentNullException

key is null.

Properties

MinimumSize

Gets the minimum data size.

public override byte MinimumSize { get; }

Property Value

byte

Methods

Decrypt(byte[], int, int)

Decrypts the specified input.

public override 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.

Encrypt(byte[], int, int)

Encrypts the specified input.

public override 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[]

Encrypted data.