How to explicitly specify the size of an array parameter passed to a function

Viewed 13837

I have a function which accepts a parameter named IV. Is there anyway that I can explicitly specify the size of the parameter IV to be 16 ?

public AESCBC(byte[] key, byte[16] inputIV)
{

   //blah blah

}

The above is of course not working. Is it possible? I know I can check it inside the function and throw an exception but can it be defined in the function definition ?

2 Answers
Related