NETPGP(3lua) LOCAL NETPGP(3lua)
netpgp -- provides access to libnetpgp(3) functionality from Lua
local netpgp = require 'netpgp' instance = netpgp.new() netpgp.homedir(instance, homedir) netpgp.init(instance) netpgp.encrypt_file(instance, file, output, armour) netpgp.decrypt_file(instance, file, output, armour) netpgp.sign_file(instance, file, output, armour, detached) netpgp.clearsign_file(instance, file, output, armour, detached) netpgp.verify_file(instance, file, armour) netpgp.verify_cat_file(instance, file, output, armour) netpgp.list_packets(instance, file, armour) netpgp.setvar(instance, name, value) netpgp.getvar(instance, name, value)
The netpgp Lua binding provides access to functionality availabile in libnetpgp(3).
The following example code demonstrates the process of encrypting, decrypting, signing, and verifying a file, in a single script. local netpgp = require 'netpgp' btc = netpgp.new() netpgp.setvar(btc, "need seckey", 1) netpgp.init(btc) netpgp.encrypt_file(btc, "scratch", "scratch.gpg", "armoured") netpgp.decrypt_file(btc, "scratch.gpg", "itch", "armoured") netpgp.sign_file(btc, "scratch", "scratch.asc", "armoured", "detached") netpgp.verify_file(btc, "scratch.asc", "armoured")
lua(1), luac(1), libnetpgp(3), intro(3lua)
netpgp Lua binding first appeared in NetBSD 9.0.
The netpgp Lua binding was written by Alistair Crooks. This manual was written by Sevan Janiyan <sevan@NetBSD.org>.
This binding currently only provides a subset of the functionality avail- able in libnetpgp(3). This manual needs more description of the avail- able functionality. NetBSD 9.0 April 30, 2018 NetBSD 9.0
You can also request any man page by name and (optionally) by section: