Hi,
im trying to create a salt for passwords that the user inputs, this is the method im using:
private String saltCreation(){
Random random=new SecureRandom();
byte[] array=new byte[20];
random.nextBytes(array);
return Base64.encode(array);
}
im using the SecureRandom from javabc.SecureRandom;
When i try to run it i get the following error:
Registration.java:244: error: cannot find symbol
random.nextBytes(array);
symbol: method nextBytes(byte[])
location: variable random of type Random
When i look at the Class SecureRandom :
SecureRandom.java I can see the function getBytes(byte[]):
Is there something that i am missing or is there another way to implement it?
Thanks in advance,
Steve