Using Salt
Closed this issue · 1 comments
UnknownObject000 commented
What should I do if I want to use salt?
FloatingComet62 commented
function makeSalt(length: number): string {
const possibleChar = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890'.split('')
let salt = '';
for(let i = 0; i < length; i++) {
salt += possibleChar[Math.floor(Math.random() * possibleChar.length)];
}
return salt;
}