NETPGP(3lua)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’– 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 πŸ‘‘

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