Skip to content

Instantly share code, notes, and snippets.

@normoes
Created June 13, 2020 14:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save normoes/4ecae7ae5fa0cca105cbf0b6043aede9 to your computer and use it in GitHub Desktop.
Save normoes/4ecae7ae5fa0cca105cbf0b6043aede9 to your computer and use it in GitHub Desktop.
Python and privy - password-protect data

Python and privy

python -c "import privy; hidden=privy.hide(secret=b'test', password='passwd', security=2); print(hidden); plain=privy.peek(hidden=hidden, password='passwd'); print(plain.decode())"

Output:

1$2$7nzvIxU2Xkt8DE4DgxwIgRt_HE6acDcPx10mCCQXbDM=$Z0FBQUFBQmU1T1pKQ0hfSVJ6bmZxZVpVckpTTzd4NElYNnVfNGdweFZiLUQtdDVCREQ2djJPLWxFVG81bXNHaUtmbnJ4NTVYZXpLbm1CdWl4aEF0cFd3ZTJES19HR1ViNXc9PQ==
test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment