Table of Contents

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

bool

Methods

DecryptAsync(ArraySegment<byte>, ArraySegment<byte>, ArraySegment<byte>)

ValueTask DecryptAsync(ArraySegment<byte> nonce, ArraySegment<byte> ciphertextAndTag, ArraySegment<byte> plaintext)

Parameters

nonce ArraySegment<byte>
ciphertextAndTag ArraySegment<byte>
plaintext ArraySegment<byte>

Returns

ValueTask

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

nonce ArraySegment<byte>
plaintext ArraySegment<byte>
ciphertextAndTag ArraySegment<byte>

Returns

ValueTask

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

salt ArraySegment<byte>

Returns

ValueTask