how to use brew install gpg
https://formulae.brew.sh/formula/gnupg
$ brew install gnupg
https://github.com/Homebrew/formulae.brew.sh
GPG
GNU Privacy Guard
gpg
my_secret.json
{
"access_token": 1234567890,
"role": "root",
"uid": "007",
"version": "v1.1.1"
}
$ gpg --symmetric --cipher-algo AES256 my_secret.json
my_secret.json
=> my_secret.json.gpg
➜ 000-xyz git:(main) ✗ gpg --symmetric --cipher-algo AES256 my_secret.json
gpg: problem with the agent: Timeout
gpg: error creating passphrase: Operation cancelled
gpg: symmetric encryption of 'my_secret.json' failed: Operation cancelled
kill gpg-agent
123456789
➜ 000-xyz git:(main) ✗ gpg --version
gpg (GnuPG) 2.2.25
libgcrypt 1.8.7
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /Users/xgqfrms-mbp/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
questions
https://gpgtools.tenderapp.com/discussions/beta/2239-gpg-problem-with-the-agent-timeout-gpg-skipped
https://unix.stackexchange.com/questions/242469/gpg2-decryption-timeout-no-secret-key
https://stackoverflow.com/questions/28802525/unable-to-generate-gpg-keys-in-linux
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!