p l -tag -width XXXX -compact t Dv instance = netpgp.new() t Dv netpgp.homedir(instance, homedir) t Dv netpgp.init(instance) t Dv netpgp.encrypt_file(instance, file, output, armour) t Dv netpgp.decrypt_file(instance, file, output, armour) t Dv netpgp.sign_file(instance, file, output, armour, detached) t Dv netpgp.clearsign_file(instance, file, output, armour, detached) t Dv netpgp.verify_file(instance, file, armour) t Dv netpgp.verify_cat_file(instance, file, output, armour) t Dv netpgp.list_packets(instance, file, armour) t Dv netpgp.setvar(instance, name, value) t Dv netpgp.getvar(instance, name, value) .El .Sh DESCRIPTION The .Nm Lua binding provides access to functionality available in .Xr libnetpgp 3 . .Sh EXAMPLES The following example code demonstrates the process of encrypting, decrypting, signing, and verifying a file, in a single script. d -literal 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") .Ed .Sh SEE ALSO .Xr lua 1 , .Xr luac 1 , .Xr libnetpgp 3 , .Xr intro 3lua .Sh HISTORY .Nm Lua binding first appeared in .Nx 9.0 . .Sh AUTHORS .An -nosplit The .Nm Lua binding was written by .An Alistair Crooks . .Sh BUGS This binding currently only provides a subset of the functionality available in .Xr libnetpgp 3 . This manual needs more description of the available functionality.