0

I'm working on cryptography algorithm and I need to convert initialization vector from uint[] to byte[]:

public byte[] IV { get; set; }

....

uint[] vector = new uint[256] { 0x95ae2518, 0x6fff22fc ...... };
int i=-1;
foreach (uint vec in vector)
{
   IV[++i] = Convert.ToByte(vec);
}

That's not working - it sais that uint is too large to be converted to byte. So how do you convert from uint[] to byte[]?

0 Answers0