Skip to content

Instantly share code, notes, and snippets.

@tuxknowledge
Created May 17, 2013 14:48
Show Gist options
  • Save tuxknowledge/5599537 to your computer and use it in GitHub Desktop.
Save tuxknowledge/5599537 to your computer and use it in GitHub Desktop.
Create OpenDJ password hash
#!/usr/bin/env python
import base64, getpass, hashlib, os
salt = os.urandom(8)
print '{SSHA}' + base64.b64encode(hashlib.sha1(getpass.getpass() + salt).digest() + salt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment