Generate random key for encryption module
I have defined a custom PI module for encrypt and decrypt fields in a xml,
For encrypt and decrypt the fields I'm using a varible=key array byte, I need this varible is diferent in the several executions, for this reason I have the next code suurce where I asiggn a value to the variable Key with a random:
private byte secretKey=new byte;
Random random= new Random();
but the problem is that always have the same coding in the several executions,I dont understand where is the problem.
Thanks and best regards.