So, this is what happened:
I'm working on a project to university, and i have a class in C# with these following arrays.
private byte[] Key = { 123, 217, 19, 11, 24, 26, 85, 45, 114, 184, 27, 162, 37, 112, 222, 209, 241, 24, 175, 144, 173, 53, 196, 29, 24, 26, 17, 218, 131, 236, 53, 209 };
private byte[] Vector = { 146, 64, 191, 111, 23, 3, 113, 119, 231, 121, 252, 112, 79, 32, 114, 156 };
These are hardcoded in the class code, they are used to encrypt and desencrypt the text.
Everything is working fine, but i need to be able to manipulate these values, this is, i want to create on the user interface textboxes that can insert values like those ones, and the algorithm gets these values and works with them.
if i read these arrays as string i get:
7B-D9-13-0B-18-1A-55-2D-72-B8-1B-A2-25-70-DE-D1-F1-18-AF-90-AD-35-C4-1D-18-1A-11-DA-83-EC-35-D1
All i need is, read a string like "123, 217, 19, 11, 24, 26, 85, 45", and transform this in byte array like the ones i already have, so i can use the cryptography class with different byte arrays. And we can skip the part of diving the string by the "," and removing the blank spaces.
Ive researched but i just cant find anything, is all talking about streaming, i need to work with them like a normal string or int array, conversions, array index, etc...
Any ideas?