Class AesCipher
- Namespace
 - Renci.SshNet.Security.Cryptography.Ciphers
 
- Assembly
 - Renci.SshNet.dll
 
AES cipher implementation.
public sealed class AesCipher : BlockCipher, IDisposable
  - Inheritance
 - 
      
      
      
      
      AesCipher
 
- Implements
 
- Inherited Members
 
Constructors
AesCipher(byte[], byte[], AesCipherMode, bool)
Initializes a new instance of the AesCipher class.
public AesCipher(byte[] key, byte[] iv, AesCipherMode mode, bool pkcs7Padding = false)
  Parameters
keybyte[]The key.
ivbyte[]The IV.
modeAesCipherModeThe mode.
pkcs7PaddingboolEnable PKCS7 padding.
Exceptions
- ArgumentNullException
 keyis null.- ArgumentException
 Keysize is not valid for this algorithm.
Methods
Decrypt(byte[], int, int)
public override byte[] Decrypt(byte[] input, int offset, int length)
  Parameters
Returns
- byte[]
 
DecryptBlock(byte[], int, int, byte[], int)
public override int DecryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
  Parameters
Returns
Dispose()
public void Dispose()
  Dispose(bool)
Dispose the instance.
public void Dispose(bool disposing)
  Parameters
disposingboolSet to True to dispose of resouces.
Encrypt(byte[], int, int)
public override byte[] Encrypt(byte[] input, int offset, int length)
  Parameters
Returns
- byte[]
 
EncryptBlock(byte[], int, int, byte[], int)
public override int EncryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)