应用程序配置的加密工具。
sesame的Python项目详细描述
几乎所有的应用程序都有某种类型的配置,通常这种配置 是敏感的-数据库密码、SMTP帐户详细信息、API密钥等。
现在使用公共源代码管理很常见;这意味着您不能 用代码存储应用程序的敏感配置的时间更长。
sesame提供了一种加密(和解密)应用程序配置的简单方法。 所以它可以安全地存储在公共源代码管理中。
安装
要安装sesame,只需:
$ pip install --pre sesame
由于pip版本1.4,--pre参数是必需的,因为keyczar是 仍然是阿尔法版本。使用早期版本pip的用户可以忽略 --pre。
用法
sesame的接口故意类似于tar。只有两个 子命令:encrypt和decrypt,如下所述:
usage: sesame encrypt [-h][-k KEYFILE][-f] outputfile inputfile [inputfile ...] positional arguments: outputfile Encrypted file to be created inputfile Files to be encrypted optional arguments: -h, --help show this help message and exit -k KEYFILE, --keyfile KEYFILE Path to keyczar encryption key -f, --force Force overwrite of existing encrypted file
usage: sesame decrypt [-h][-k KEYFILE][-f][-O OUTPUT_DIR][-T] inputfile positional arguments: inputfile File to be decrypted optional arguments: -h, --help show this help message and exit -k KEYFILE, --keyfile KEYFILE Path to keyczar encryption key -f, --force Force overwrite of existing decrypted file -O OUTPUT_DIR, --output-dir OUTPUT_DIR Extract files into a specific directory -T, --try-all Search for keys from current directory and try all of them