Class Arc4Cipher
- Namespace
- Renci.SshNet.Security.Cryptography.Ciphers
- Assembly
- Renci.SshNet.dll
Implements ARCH4 cipher algorithm.
public sealed class Arc4Cipher : StreamCipher
- Inheritance
-
Arc4Cipher
- Inherited Members
Constructors
Arc4Cipher(byte[], bool)
Initializes a new instance of the 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
- byte
The minimum data size.
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
intThe zero-based offset in
input
at which to begin decrypting.length
intThe 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
intThe zero-based offset in
input
at which to begin encrypting.length
intThe number of bytes to encrypt from
input
.
Returns
- byte[]
Encrypted data.