Class Arc4Cipher
- 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
Exceptions
- ArgumentNullException
-
key
is null.
Properties
MinimumSize
Gets the minimum data size.
public override byte MinimumSize { get; }
Property Value
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.