man.bsd.lv manual page server

Manual Page Search Parameters

NETPGP(3lua) 3lua NETPGP(3lua)

netpgpprovides access to libnetpgp(3) functionality from Lua

local netpgp = require 'netpgp'

 
 
 
 
 
 
 
 
 
 
 
 

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 available in libnetpgp(3). This manual needs more description of the available functionality.

April 30, 2018 NetBSD-9.2