Skip to content

griz encrypt

Encrypts text and files.

Note

When passing in text on the command line, we recommend encasing it in quotes (ie "Secret Message"). Command line arguments are parsed by the shell in their own way, and special characters could cause them to be interpreted differently than expected.

By default, encrypted files and text are also Asset tagged. The Asset tag contains information to create a unique system fingerprint. It contains:

  • The name cli-text
  • User: The OS system user
  • File hash (SHA256)
  • CPU Information
  • Total Memory
  • Platform
  • OS Arch
  • Hostname
  • Networking Interfaces

Disable Asset Tagging by including the --no-asset-tag flag.

Flags

flag Description
--file Path to the file to encrypt. This can be used multiple times
--out-dir The our directory for the encrypted file(s)
--out-file Path to the resulting encrypted file
--keyring The KeyRing to use when encrypting. Defaults to the Profile's KeyRing
--overwrite Overwrite a file that already exists

Examples

# Encrypts text
griz encrypt "Some text to encrypt"

# Encrypts a file using the "legal" KeyRing
griz encrypt --file ./file.txt --keyringring Legal

# Encrypts multiple files without Asset tagging them, and overwrites any existing encrypted files
griz encrypt --file ./some/file/path.txt -f ./some/other/file.txt --no-asset-tag --overwrite