73. GPG

A wrapper for gpg binary

73.1. Summary of Module Globals

List of Global Functions

  • CreateKey - Create a new gpg key. Executes 'gpg --gen-key' in an xterm window (in the QT UI) or in the terminal window (in the ncurses UI).

  • ExportAsciiPublicKey - Export a public gpg key in ACSII armored file.

  • ExportPublicKey - Export a public gpg key in binary format.

  • Init - (Re)initialize the module, the cache is invalidated if the home directory is changed.

  • PrivateKeys - Return list of the private keys in the keyring.

  • PublicKeys - Return list of the public keys in the keyring.

  • SignAsciiDetached - Sign a file. The ASCII armored signature is stored in file with .asc suffix

  • SignDetached - Sign a file. The binary signature is stored in file with .sig suffix

  • VerifyFile - Verify a file using a signature file. The key which has been used for signing must be imported in the keyring.

List of Global Variables

    73.2. Global Functions

    73.2.1. CreateKey

    Create a new gpg key. Executes 'gpg --gen-key' in an xterm window (in the QT UI) or in the terminal window (in the ncurses UI).

    Return value

    • void

    73.2.2. ExportAsciiPublicKey

    Export a public gpg key in ACSII armored file.

    Function parameters

    • string keyid

    • string file

    Return value

    • boolean - true if the file has been successfuly signed

    73.2.3. ExportPublicKey

    Export a public gpg key in binary format.

    Function parameters

    • string keyid

    • string file

    Return value

    • boolean - true if the file has been successfuly signed

    73.2.4. Init

    (Re)initialize the module, the cache is invalidated if the home directory is changed.

    Function parameters

    • string home_dir

    • boolean force

    Return value

    • void

    73.2.5. PrivateKeys

    Return list of the private keys in the keyring.

    Return value

    • list<map> - public keys: [ $["fingerprint": string key_fingerprint, "id": string key_ID, "uid": list<string> user_ids], ...]

    73.2.6. PublicKeys

    Return list of the public keys in the keyring.

    Return value

    • list<map> - public keys: [ $["fingerprint": string key_fingerprint, "id": string key_ID, "uid": list<string> user_ids], ...]

    73.2.7. SignAsciiDetached

    Sign a file. The ASCII armored signature is stored in file with .asc suffix

    Function parameters

    • string keyid

    • string file

    • string passphrase

    Return value

    • boolean - true if the file has been successfuly signed

    73.2.8. SignDetached

    Sign a file. The binary signature is stored in file with .sig suffix

    Function parameters

    • string keyid

    • string file

    • string passphrase

    Return value

    • boolean - true if the file has been successfuly signed

    73.2.9. VerifyFile

    Verify a file using a signature file. The key which has been used for signing must be imported in the keyring.

    Function parameters

    • string sig_file

    • string file

    Return value

    • boolean - true if the file has been successfuly verified

    73.3. Global Variables

    73.4. Module Requirements

    73.4.1. Module Imports

    • Report
    • String

    73.4.2. Module Includes