Salt.newSalt constructor
Salt.newSalt({
- int length = 16,
Factory constructor to create a salt with random bytes.
Optionally accepts a length
of type int to create salts
of a length that the user inputs.
Implementation
factory Salt.newSalt({int length = 16}) {
return Salt(SecureRandomGen.getRandomBytes(16));
}