NETPGP(3lua)
π NETPGP(3lua) π
okay so this is the local manual page for netpgp β the Lua binding situation β bestie, it's giving "crypto powers, but make it Lua". π¦
β¨ NAME β¨
netpgp β this is the thing that hands you all the libnetpgp(3) functionality straight from Lua, no cap. π₯
π SYNOPSIS π
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)
like, that's the whole roster. every function takes instance first because that's just how we're doing things. π
πΈ DESCRIPTION πΈ
The netpgp Lua binding is literally your backstage pass to everything in libnetpgp(3). that's it, that's the vibe. β¨
π§ EXAMPLES π§
okay so this next bit is the icon of the page β a single script that encrypts, decrypts, signs, and verifies a file. main character energy fr fr:
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")
not me noticing they named the instance btc π iconic. also yes, "itch" is the output file, we love a bit. π
π SEE ALSO π
lua(1)luac(1)libnetpgp(3)intro(3lua)
go read those, iykyk π«Ά
β HISTORY β
the netpgp Lua binding first appeared in NetBSD 9.0. baby's debut era. π
π AUTHORS π
The netpgp Lua binding was written by Alistair Crooks. ty for your service, king. π
π BUGS π
- This binding currently only provides a subset of the functionality available in
libnetpgp(3). so like, not everything is here yet π - This manual needs more description of the available functionality. yeah... the docs are lowkey under construction, we know, we know. π
fr fr though: that's the actual state of things, don't come for me, i'm just the messenger π
that's the whole page bestie, slay. π source/version and date realness: this one's the Debian build, dated April 30, 2018 β yes, an elder, but she ate. πβ¨
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2018 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms