2
AesCryptoServiceProvider aesAlg = new AesCryptoServiceProvider()
var iv = aesAlg.GenerateIV();

Do you know what the length of iv? Is it fixed with byte[16]?

Another question is: what is the length requirement of initialization vector of AesCryptoServiceProvider?

4

1 回答 1

1

The iv for AES is the same as the block size which is 128-bits/16-bytes.

AES has one fixed block size, and three key sizes: 128-bits, 192-bits and 256-bits.

于 2016-06-07T01:01:42.777 回答