Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add a manual for netpgp(3lua)
details: https://anonhg.NetBSD.org/src/rev/2ae7e7fb8e9a
branches: trunk
changeset: 322344:2ae7e7fb8e9a
user: sevan <sevan%NetBSD.org@localhost>
date: Mon Apr 30 01:10:13 2018 +0000
description:
Add a manual for netpgp(3lua)
diffstat:
distrib/sets/lists/man/mi | 3 +-
share/man/man3lua/Makefile | 4 +-
share/man/man3lua/intro.3lua | 9 +++-
share/man/man3lua/netpgp.3lua | 95 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 106 insertions(+), 5 deletions(-)
diffs (165 lines):
diff -r 5c3fd8135d46 -r 2ae7e7fb8e9a distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Sun Apr 29 23:30:59 2018 +0000
+++ b/distrib/sets/lists/man/mi Mon Apr 30 01:10:13 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1577 2018/02/25 12:53:22 kamil Exp $
+# $NetBSD: mi,v 1.1578 2018/04/30 01:10:13 sevan Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -6715,6 +6715,7 @@
./usr/share/man/man3lua/gpio.unset.3lua man-sys-man .man
./usr/share/man/man3lua/gpio.write.3lua man-sys-man .man
./usr/share/man/man3lua/intro.3lua man-sys-man .man
+./usr/share/man/man3lua/netpgp.3lua man-sys-man .man
./usr/share/man/man3lua/sqlite.3lua man-sys-man .man
./usr/share/man/man3lua/syslog.3lua man-sys-man .man
./usr/share/man/man4/aac.4 man-sys-man .man
diff -r 5c3fd8135d46 -r 2ae7e7fb8e9a share/man/man3lua/Makefile
--- a/share/man/man3lua/Makefile Sun Apr 29 23:30:59 2018 +0000
+++ b/share/man/man3lua/Makefile Mon Apr 30 01:10:13 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.4 2013/11/13 20:55:08 mbalmer Exp $
+# $NetBSD: Makefile,v 1.5 2018/04/30 01:10:13 sevan Exp $
-MAN= gpio.3lua intro.3lua sqlite.3lua syslog.3lua
+MAN= gpio.3lua intro.3lua netpgp3.lua sqlite.3lua syslog.3lua
MLINKS+=gpio.3lua gpio.open.3lua \
gpio.3lua gpio.info.3lua \
diff -r 5c3fd8135d46 -r 2ae7e7fb8e9a share/man/man3lua/intro.3lua
--- a/share/man/man3lua/intro.3lua Sun Apr 29 23:30:59 2018 +0000
+++ b/share/man/man3lua/intro.3lua Mon Apr 30 01:10:13 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: intro.3lua,v 1.7 2017/04/15 23:33:52 sevan Exp $
+.\" $NetBSD: intro.3lua,v 1.8 2018/04/30 01:10:13 sevan Exp $
.\"
.\" Copyright (c) 2013, 2016 Marc Balmer <mbalmer%NetBSD.org@localhost>.
.\" All rights reserved.
@@ -28,7 +28,7 @@
.\" SUCH DAMAGE.
.\"
.\"
-.Dd April 16, 2017
+.Dd April 30, 2018
.Dt INTRO 3lua
.Os
.Sh NAME
@@ -47,6 +47,10 @@
Access
.Xr gpio 4
pins.
+.It Em netpgp
+Access
+.Xr libnetpgp 3
+functionality.
.It Em sqlite
Access
.Xr sqlite3 1
@@ -60,6 +64,7 @@
.Xr lua 1 ,
.Xr luac 1 ,
.Xr gpio 3lua ,
+.Xr netpgp 3lua ,
.Xr sqlite 3lua ,
.Xr syslog 3lua ,
.Xr intro 9lua
diff -r 5c3fd8135d46 -r 2ae7e7fb8e9a share/man/man3lua/netpgp.3lua
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man3lua/netpgp.3lua Mon Apr 30 01:10:13 2018 +0000
@@ -0,0 +1,95 @@
+.\" $NetBSD: netpgp.3lua,v 1.1 2018/04/30 01:10:13 sevan Exp $
+.\"
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Sevan Janiyan <sevan%NetBSD.org@localhost>.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\"
+.Dd April 30, 2018
+.Dt NETPGP 3lua
+.Os
+.Sh NAME
+.Nm netpgp
+.Nd provides access to
+.Xr libnetpgp 3
+functionality from Lua
+.Sh SYNOPSIS
+.Cd "local netpgp = require 'netpgp'"
+.Pp
+.Bl -tag -width XXXX -compact
+.It Dv instance = netpgp.new()
+.It Dv netpgp.homedir(instance, homedir)
+.It Dv netpgp.init(instance)
+.It Dv netpgp.encrypt_file(instance, file, output, armour)
+.It Dv netpgp.decrypt_file(instance, file, output, armour)
+.It Dv netpgp.sign_file(instance, file, output, armour, detached)
+.It Dv netpgp.clearsign_file(instance, file, output, armour, detached)
+.It Dv netpgp.verify_file(instance, file, armour)
+.It Dv netpgp.verify_cat_file(instance, file, output, armour)
+.It Dv netpgp.list_packets(instance, file, armour)
+.It Dv netpgp.setvar(instance, name, value)
+.It Dv netpgp.getvar(instance, name, value)
+.El
+.Sh DESCRIPTION
+The
+.Nm
+Lua binding provides access to functionality availabile 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.
+.Bd -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 .
+This manual was written by
+.An Sevan Janiyan Aq Mt sevan%NetBSD.org@localhost .
+.Sh BUGS
+This binding currently only provides a subset of the functionality available in
+.Xr libnetpgp 3 .
+This manual needs more description of the functionality available .
Home |
Main Index |
Thread Index |
Old Index