Class Cipher
- Namespace
- Renci.SshNet.Security.Cryptography
- Assembly
- Renci.SshNet.dll
Base class for cipher implementation.
public abstract class Cipher
- Inheritance
-
Cipher
- Derived
- Inherited Members
Constructors
Cipher()
protected Cipher()
Properties
MinimumSize
Gets the minimum data size.
public abstract byte MinimumSize { get; }
Property Value
- byte
The minimum data size.
TagSize
Gets the size of the authentication tag for ciphers which implement Authenticated Encryption (AE).
public virtual int TagSize { get; }
Property Value
- int
When this Cipher implements Authenticated Encryption, the size, in bytes, of the authentication tag included in the encrypted message.
Methods
Decrypt(byte[])
Decrypts the specified input.
public 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
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[])
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
intThe zero-based offset in
input
at which to begin encrypting.length
intThe number of bytes to encrypt from
input
.
Returns
- byte[]
The encrypted data.