Interface ISegmentCipher
- Namespace
- The.Security.Cryptography
- Assembly
- Instagile.dll
A platform's AES-GCM implementation of one SegmentedAead stream's segment key.
public interface ISegmentCipher : IDisposable
- Inherited Members
Properties
IsSynchronous
If false, the operations may complete asynchronously, so the stream can only be read asynchronously.
bool IsSynchronous { get; }
Property Value
Methods
DecryptAsync(ArraySegment<byte>, ArraySegment<byte>, ArraySegment<byte>)
Verify and decrypt a segment written by EncryptAsync(ArraySegment<byte>, ArraySegment<byte>, ArraySegment<byte>).
ValueTask DecryptAsync(ArraySegment<byte> nonce, ArraySegment<byte> ciphertextAndTag, ArraySegment<byte> plaintext)
Parameters
nonceArraySegment<byte>ciphertextAndTagArraySegment<byte>plaintextArraySegment<byte>
Returns
Exceptions
- CryptographicException
The segment, its nonce or the key do not match.
EncryptAsync(ArraySegment<byte>, ArraySegment<byte>, ArraySegment<byte>)
Encrypt a segment without associated data, writing its ciphertext followed by its tag.
ValueTask EncryptAsync(ArraySegment<byte> nonce, ArraySegment<byte> plaintext, ArraySegment<byte> ciphertextAndTag)
Parameters
nonceArraySegment<byte>plaintextArraySegment<byte>ciphertextAndTagArraySegment<byte>
Returns
InitialiseAsync(ArraySegment<byte>)
Derive the segment key from the main key, the stream's salt and its associated data, after which the main key is discarded.
ValueTask InitialiseAsync(ArraySegment<byte> salt)
Parameters
saltArraySegment<byte>