in reply to Crypt OpenPGP Brain twister
That seems to be the major stumbling block. I tried it, and it came back undef each time, "undef" meaning failure. So I put together this example from the docs.
First, we need to create a plaintext data packet object and serialize that object. Next, deserialize the object.
I used Crypt::OpenPGP::Plaintext.
#!/usr/bin/perl use strict; use warnings; use Crypt::OpenPGP::Plaintext; use Data::Dumper::Concise; my $data = 'foo bar'; my $file = '/root/Desktop/foo.txt'; my $pt = Crypt::OpenPGP::Plaintext->new( Data => $data, Filename => $file, Mode => 'b', ); binmode STDOUT, ':encoding(utf8)'; print Dumper(my $serialized = $pt->save); print Dumper($serialized = $pt->data);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Crypt OpenPGP Brain twister
by Anonymous Monk on Jun 22, 2011 at 07:23 UTC | |
by Anonymous Monk on Aug 14, 2012 at 20:34 UTC | |
by Anonymous Monk on Aug 17, 2012 at 11:10 UTC | |
by Anonymous Monk on Aug 14, 2012 at 20:39 UTC | |
|
Re^2: Crypt OpenPGP Brain twister
by Anonymous Monk on Feb 02, 2014 at 18:30 UTC | |
by Anonymous Monk on Jul 31, 2019 at 03:21 UTC |