incrementel asymetric encryption?
Zeljko Vrba
zvrba at globalnet.hr
Sun Nov 21 13:12:36 CET 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
|
| But how can I decrypt the whole log at once - or how can I encrypt
the log
| incremental, to create one big GPG Message?
|
Well, the log is full of GPG start/end headers like
- -----BEGIN PGP...
- -----END PGP..
You can use csplit(3) to split the logs into corresponding PGP chunks.
Something like:
csplit -z q1 '/^-----END PGP MESSAGE-----/+1' '{*}'
will split the logfile in a series of files named xx00, xx01, ... one
file for each PGP record. If you have many log messages, you can also
add -n option to increase the number of decimal digits, e.g. -n4
Then write a simple for loop (xx is csplit's default prefix):
for i in xx*; do gpg <OPTIONS> $i -o $i.out; done
Of course, this assumes a normal UNIX system with bourne-like shell.
- --
The corresponding PGP public key can be found at:
http://ds.carnet.hr:11371/pks/lookup?op=get&search=0x5081D08A1DC7E994
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBoIY0UIHQih3H6ZQRAxb4AJ4+DFb0NYyBpZ9Uvst3DEVNpdV0FgCfY7T5
J2ZwNH8/2WxKaRI1vjTG1+0=
=r36J
-----END PGP SIGNATURE-----
More information about the Gnupg-users
mailing list