Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Salt #21

Closed
UnknownObject000 opened this issue Nov 10, 2019 · 1 comment
Closed

Using Salt #21

UnknownObject000 opened this issue Nov 10, 2019 · 1 comment

Comments

@UnknownObject000
Copy link

UnknownObject000 commented Nov 10, 2019

What should I do if I want to use salt?

@FloatingComet62
Copy link

FloatingComet62 commented May 8, 2022

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;
}

@emn178 emn178 closed this as completed Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants