Created
October 14, 2013 02:01
-
-
Save kf0jvt/6969624 to your computer and use it in GitHub Desktop.
Keyczar example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keyczar import keyczar | |
s = 'secret string' | |
location = '/tmp/kz' | |
crypter = keyczar.Crypter.Read(location) | |
s_encrypted = crypter.Encrypt(s) | |
s_decrypted = crypter.Decrypt(s_encrypted) | |
print s | |
print s_encrypted | |
print s_decrypted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir -p /tmp/kz | |
$ keyczart create --location=/tmp/kz --purpose=crypt | |
$ keyczart addkey --location=/tmp/kz --status=primary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment