Categorygithub.com/Rehtt/archive
modulepackage
1.0.0
Repository: https://github.com/rehtt/archive.git
Documentation: pkg.go.dev

# README

使用RSA 4096bit 与AES 256bit CBC共同加密、解密的tar.xz压缩、解压缩的简单实现

安装

go install

要求go版本>=1.18

go install github.com/Rehtt/archive@latest

命令

生成公钥与私钥

archive -generateRsaKey

将生成public.pem(加密)private.pem(解密)证书

private.pem必须妥善保管。若有遗失,则加密的文件就再也无法打开

普通tar.xz打包压缩

archive -a -in test -out test.tar.xz

加密压缩

archive -a -e -inKey public.pem -in test -out test.tar.xz

普通tar.xz解压

archive -ua -in test.tar.xz -out test

解密解压

archive -ua -inKey public.pem -in test.tar.xz -out test

命令树

  -a    压缩
  -check
        检测压缩包的错误
  -d    开启解密
  -e    开启加密
  -generateRsaKey
        生成公钥和私钥
  -in string
        输入文件
  -inKey string
        解密指定私钥,加密指定公钥
  -out string
        输出文件
  -ua
        解压

# Packages

No description provided by the author
No description provided by the author