Interface IEncrypter
Defines an interface for encryption and decryption operations.
public interface IEncrypter : IDisposable
- Inherited Members
Properties
IV
Gets or sets the initialization vector.
byte[] IV { get; set; }
Property Value
- byte[]
KeySize
Gets the key size in bits.
int KeySize { get; }
Property Value
Methods
DecryptFinal(byte[], int, int, VersatileBuffer)
Decrypts data with finalization.
int DecryptFinal(byte[] data, int start, int length, VersatileBuffer output = null)
Parameters
databyte[]The data to decrypt.
startintThe starting index.
lengthintThe number of bytes to decrypt.
outputVersatileBufferOptional output buffer.
Returns
- int
The number of bytes in the decrypted output.
DecryptFinal(VersatileBufferStream)
Decrypts a stream with finalization.
VersatileBufferStream DecryptFinal(VersatileBufferStream stream)
Parameters
streamVersatileBufferStreamThe stream to decrypt.
Returns
- VersatileBufferStream
The decrypted stream.
Encrypt(VersatileBufferStream, int, int)
Encrypts a portion of the stream without finalization.
VersatileBufferStream Encrypt(VersatileBufferStream stream, int offset, int size)
Parameters
streamVersatileBufferStreamThe stream to encrypt.
offsetintThe offset within the stream.
sizeintThe number of bytes to encrypt.
Returns
- VersatileBufferStream
The encrypted stream.
EncryptFinal(byte[], int, int, VersatileBuffer)
Encrypts data with finalization.
int EncryptFinal(byte[] data, int start, int length, VersatileBuffer output = null)
Parameters
databyte[]The data to encrypt.
startintThe starting index.
lengthintThe number of bytes to encrypt.
outputVersatileBufferOptional output buffer.
Returns
- int
The number of bytes in the encrypted output.
EncryptFinal(VersatileBufferStream)
Encrypts a stream with finalization.
VersatileBufferStream EncryptFinal(VersatileBufferStream stream)
Parameters
streamVersatileBufferStreamThe stream to encrypt.
Returns
- VersatileBufferStream
The encrypted stream.