Module Name: src
Committed By: agc
Date: Sun Oct 18 07:23:37 UTC 2009
Modified Files:
src/crypto/external/bsd/netpgp/dist/bindings/lua: netpgp.lua
Log Message:
Use a lua for loop in preference to a while and increment in the lua
example code - suggested by Marc Balmer.
% make USETOOLS=no t
cp Makefile a
./netpgp.lua --sign --detached a
netpgp: default key set to "C0596823"
pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12
Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823
uid Alistair Crooks <[email protected]>
uid Alistair Crooks <[email protected]>
uid Alistair Crooks <[email protected]>
uid Alistair Crooks <[email protected]>
netpgp passphrase:
-rw-r--r-- 1 agc agc 287 Oct 17 15:58 a.sig
./netpgp.lua --verify a.sig
netpgp: default key set to "C0596823"
netpgp: assuming signed data in "a"
Good signature for a.sig made Sat Oct 17 15:58:09 2009
using RSA (Encrypt or Sign) key 1b68dcfcc0596823
pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12
Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823
uid Alistair Crooks <[email protected]>
uid Alistair Crooks <[email protected]>
uid Alistair Crooks <[email protected]>
uid Alistair Crooks <[email protected]>
%
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua
diff -u src/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua:1.2 src/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua:1.3
--- src/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua:1.2 Sun Oct 18 07:17:28 2009
+++ src/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua Sun Oct 18 07:23:37 2009
@@ -77,8 +77,8 @@
-- initialise everything
netpgp.init(pgp)
-local i = 1
-while i <= #args do
+local i
+for i = 1, #args do
if options.encrypt then
-- encrypt a file
netpgp.encrypt_file(pgp, args[1], output, armour)
@@ -97,5 +97,4 @@
-- verification of detached signature
netpgp.verify_file(pgp, args[1], armour)
end
- i = i + 1
end