systemd-creds
List, show, encrypt, and decrypt service credentials. tldr-pages
On Linux
Linux
Encrypt a file and set a specific name
systemd-creds encrypt --name name path/to/input_file path/to/outputIdentifyDecrypt the file again
systemd-creds decrypt path/to/input_file path/to/output_fileIdentifyEncrypt text from stdin
echo -n text | systemd-creds encrypt --name name - path/to/outputIdentify-nNo trailing newline toyboxEncrypt the text and append it to the .service file (the credentials will be available in $CREDENTIALS_DIRECTORY)
echo -n text | systemd-creds encrypt --name name --pretty - - >>serviceIdentify-nNo trailing newline toyboxCreate a credential that is only valid until the given timestamp
systemd-creds encrypt --not-after "timestamp" path/to/input_file path/to/output_fileIdentify