-
Notifications
You must be signed in to change notification settings - Fork 3
IBlockModeOneShot
Bruce Wayne edited this page Nov 10, 2025
·
2 revisions
-
BlockSize
Block size in bytes.
-
int GetMaxByteCount(int inputLength)
Returns the maximum number of bytes required in the output buffer for a given input length. -
void Encrypt(in ReadOnlySpan<byte> iv, in ReadOnlySpan<byte> input, in Span<byte> output)
Perform one-shot encryption using the supplied IV. The result is written intooutput. Callers must ensureoutputis large enough (useGetMaxByteCountto estimate). -
void Decrypt(in ReadOnlySpan<byte> iv, in ReadOnlySpan<byte> input, in Span<byte> output)
Perform one-shot decryption using the supplied IV. The result is written intooutput. Callers must ensureoutputis large enough. -
void Dispose()
- Verify
BlockSizeandivlength match the implementation requirements before calling. - Use
GetMaxByteCountto estimate the required output buffer size to avoid overflows. - This interface is intended for single-call processing of complete data, e.g., XtsMode.