77. GPG

A wrapper for gpg binary

77.1. Authors

  • Ladislav SlezĂĄk <lslezak@suse.cz>

77.2. 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

    77.3. Global Functions

    77.3.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

    77.3.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

    77.3.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

    77.3.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

    77.3.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], ...]

    77.3.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], ...]

    77.3.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

    77.3.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

    77.3.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

    77.4. Global Variables

    77.5. Module Requirements

    77.5.1. Module Imports

    • Report
    • String

    77.5.2. Module Includes