streamCipherTest

Use this to test a stream cipher with multiple keys, plaintexts and ivs.

version(unittest) @safe
void
streamCipherTest
(
,
string[] keys
,
string[] plaintexts
,
string[] ciphertexts
,
string[] ivs = null
)
in { assert (keys.length == plaintexts.length, "expected as much plaintexts as keys"); assert (keys.length == ciphertexts.length, "expected as much ciphertexts as keys"); if (ivs != null) { assert (keys.length == ivs.length, "expected as much ivs as keys"); } }

Parameters

c

the cipher engine

keys
Type: string[]

keys in binary format

plaintexts
Type: string[]

plaintexts in binary format

ciphertexts
Type: string[]

cipher texts in binary format

ivs
Type: string[]

initialisation vectors, could be 'null'

Meta