Gpg
gpg_list_keys_public¶
List GPG public key IDs, optionally filtered by query.
Arguments¶
- ... (string): Optional key ID, name, or email to filter by
Exit codes¶
- 0: Always
Output on stdout¶
- One key ID per line
gpg_list_keys_secret¶
List GPG secret key IDs, optionally filtered by query.
Arguments¶
- ... (string): Optional key ID, name, or email to filter by
Exit codes¶
- 0: Always
Output on stdout¶
- One key ID per line
gpg_create¶
Generate a new 2048-bit RSA GPG key that does not expire.
Arguments¶
- $1 (string): Name for the key
- $2 (string): Email for the key
- $3 (string): Optional comment for the key
- $4 (string): Optional passphrase; if omitted the key has no passphrase
Exit codes¶
- 0: Success
- 1: gpg key generation failed
Output on stdout¶
- The new key ID on success
gpg_password_prompt¶
Interactively prompt to change the passphrase on a GPG key.
Arguments¶
- $1 (string): Key ID
Exit codes¶
- 0: Success
- 1: gpg error
gpg_export_armored¶
Export a GPG key as an ASCII-armored .asc file.
If destination is a directory, the file is named
Arguments¶
- $1 (string): Key ID to export
- $2 (string): Destination file or directory
Exit codes¶
- 0: Success
- 1: gpg error
gpg_export¶
Export a GPG key as a binary .gpg file.
If destination is a directory, the file is named
Arguments¶
- $1 (string): Key ID to export
- $2 (string): Destination file or directory
Exit codes¶
- 0: Success
- 1: gpg error
gpg_search_keys¶
Search for public keys on configured keyservers.
Arguments¶
- $1 (string): Query term (key ID, email, or name)
Exit codes¶
- 0: Always
Output on stdout¶
- Raw colon-delimited gpg search output
gpg_receive_keys¶
Fetch one or more public keys from configured keyservers.
Arguments¶
- ... (string): One or more key IDs to receive
Exit codes¶
- 0: Success
- 1: No key IDs provided
Output on stdout¶
- gpg key receipt messages
gpg_keyid_valid¶
Test whether a value is a valid GPG key ID. Accepts short (8 hex chars) or long (16 hex chars) IDs, with or without a 0x prefix.
Arguments¶
- $1 (string): Value to test
Exit codes¶
- 0: Valid key ID
- 1: Not a valid key ID