Fudge

infrastructure / scripts / mkpasswd.py

Commits | bovarysme Add instructions to upgrade OpenBSD in README.md Committed on Oct 18, 2020

259 B | Download

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/usr/bin/env python3

import bcrypt
from getpass import getpass


def main():
    password = getpass().encode('utf-8')
    hashed = bcrypt.hashpw(password, bcrypt.gensalt(rounds=12))
    print(hashed.decode('utf-8'))


if __name__ == '__main__':
    main()