GCM.start

init cipher, H, Y0, E0

struct GCM(T)
nothrow @nogc
void
start
(,
in ubyte[] key
,
in ubyte[] iv
,
uint macSize = 128
)
if (
is(T == void) ||
(
isBlockCipher!T &&
T.blockSize == 16
)
)

Parameters

forEncryption bool

encrypt (true) or decrypt (false)

iv ubyte[]

Initialization vector. Length of 96 bits is most efficient.

key ubyte[]

encryption key

macSize uint

length of authentication tag in bits. 32 <= macSize <= 128. Only multiples of 8 supported.

Meta