Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import bcrypt
  2.  
  3. # get the system salt from config.php
  4. SYSTEM_SALT = 'my-salt-from-config'
  5.  
  6. PLAINTEXT_PWD = 'my-secret-password'
  7.  
  8. # Owncloud appends the system salt to the password before hashing
  9. password = PLAINTEXT_PWD + SYSTEM_SALT
  10.  
  11. bcrypt.hashpwd(password, bcrypt.gensalt(log_rounds=8))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement