小脚本:迅速AES加密文件/目录

      2 Comments on 小脚本:迅速AES加密文件/目录

需要srm:
./bash/profile:

function enc() {
  tar zcvf - $1 | openssl aes-256-cbc -salt -out $1.aes && srm -mfzr $1
}
function dec() {
  openssl aes-256-cbc -d -in $1.aes | tar zxvf - && rm -f $1.aes
}

参考:
github.com/JElchison/encrypt-tool/blob/master/encrypt-tool.sh
blog.extracheese.org/2010/05/the-tar-pipe.html
developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/srm.1.html
netsecurity.51cto.com/art/201301/378513.htm
www.361way.com/openssl-encrypt-file/2692.html
 

2 thoughts on “小脚本:迅速AES加密文件/目录

Leave a Reply

Your email address will not be published.