Padding.unpad

ubyte[] unpad(const(ubyte)[] input, size_t blockSize)

Removes padding from the input.

Parameters

inputThe padded data (must be a multiple of blockSize).
blockSizeThe block size in bytes.

Returns

A slice of the input with padding removed.

Throws

CryptoException if padding is invalid.