weave-minimal
weave-minimal copied to clipboard
use bcrypt to hash password (db filename)
Current way: SHA1 of some random but unique key + password. PBKDF2 is better suited for this.
salt = r'\x14Q\xd4JbDk\x1bN\x84J\xd0\x05\x8a\x1b\x8b\xa6&V\x1b\xc5\x91\x97\xc4'
return join(dir, (user + '.' + sha1(salt+passwd).hexdigest()[:16]))