[Plan]Add command 'encrypt-file' and 'decrypt-file' for 'vault'
Closed this issue · 1 comments
windvalley commented
[Plan]Add command 'encrypt-file' and 'decrypt-file' for 'vault'
windvalley commented
Usage:
vault
$ gossh vault
Encrypt sensitive content such as passwords so you can protect it rather than
leaving it visible as plaintext in public place. To use vault you need another
password(vault-pass) to encrypt and decrypt the content.
Usage:
gossh vault [command]
Available Commands:
encrypt Encrypt sensitive content
decrypt Decrypt content encrypted by vault
encrypt-file Encrypt a file
decrypt-file Decrypt vault encrypted file
view View vault encrypted file
Flags:
-h, --help help for vault
Global Flags:
-V, --auth.vault-pass-file string file that holds the vault password for encryption and decryption
-v, --output.verbose show debug messages
Use "gossh vault [command] --help" for more information about a command.
vault encrypt-file
$ gossh vault encrypt-file -h
Encrypt a file.
Usage:
gossh vault encrypt-file [flags]
Examples:
# Encrypt a file by asking for vault password.
$ gossh vault encrypt-file /path/auth.txt
# Encrypt a file by vault password file.
$ gossh vault encrypt-file /path/auth.txt -V /path/vault-password-file
# Output encrypted content to another file.
$ gossh vault encrypt-file /path/auth.txt -O /path/encryption.txt
# Output encrypted content to screen.
$ gossh vault encrypt-file /path/auth.txt -O -
Flags:
-O, --output-file string file that encrypted content is written to (use - for stdout)
-h, --help help for encrypt-file
Global Flags:
-V, --auth.vault-pass-file string file that holds the vault password for encryption and decryption
-v, --output.verbose show debug messages
vault decrypt-file
$ gossh vault decrypt-file -h
Decrypt vault encrypted file.
Usage:
gossh vault decrypt-file [flags]
Examples:
# Decrypt a vault encrypted file by asking for vault password.
$ gossh vault decrypt-file /path/auth.txt
# Decrypt a vault encrypted file by vault password file.
$ gossh vault decrypt-file /path/auth.txt -V /path/vault-password-file
# Output decrypted content to another file.
$ gossh vault decrypt-file /path/auth.txt -O /path/plaintxt.txt
# Output decrypted content to screen.
$ gossh vault decrypt-file /path/auth.txt -O -
Flags:
-O, --output-file string file that decrypted content is written to (use - for stdout)
-h, --help help for decrypt-file
Global Flags:
-V, --auth.vault-pass-file string file that holds the vault password for encryption and decryption
-v, --output.verbose show debug messages
vault view
$ gossh vault view -h
View vault encrypted file.
Usage:
gossh vault view [flags]
Examples:
# View a vault encrypted file by asking for vault password.
$ gossh vault view /path/auth.txt
# View a vault encrypted file by vault password file.
$ gossh vault view /path/auth.txt -V /path/vault-password-file
Flags:
-h, --help help for view
Global Flags:
-V, --auth.vault-pass-file string file that holds the vault password for encryption and decryption
-v, --output.verbose show debug messages