Skip Menu |

This queue is for tickets about the Crypt-Keys CPAN distribution.

Report information
The Basics
Id: 60922
Status: new
Priority: 0/
Queue: Crypt-Keys

People
Owner: Nobody in particular
Requestors: mcmahon [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.06
Fixed in: (no value)



Subject: No function to directly load an already-available key blob
There's no way to take a key that's been transmitted to you over-the-wire and load it without writing it to disk as things stand; the attached patch adds a load() method (leveraged by read()) which takes the blob as a Blob parameter then does as read() does.
Subject: Crypt-Keys-0.06.patch
diff -ruad cpan/Crypt-Keys-0.06-old/blib/lib/Crypt/Keys.pm cpan/Crypt-Keys-0.06/blib/lib/Crypt/Keys.pm diff -ruad Crypt-Keys-0.06-old/lib/Crypt/Keys.pm Crypt-Keys-0.06/lib/Crypt/Keys.pm --- cpan/Crypt-Keys-0.06-old/lib/Crypt/Keys.pm 2001-08-28 16:31:09.000000000 -0700 +++ cpan/Crypt-Keys-0.06/lib/Crypt/Keys.pm 2010-08-31 13:31:31.000000000 -0700 @@ -19,6 +19,14 @@ or return $class->error("Error opening $file: $!"); my $blob; do { local $/; $blob = <FH> }; close FH or warn "Error closing $file: $!"; + $class->load(Blob=>$blob, %param); +} + +sub load { + my $class = shift; + my %param = @_; + my $blob = $param{Blob} or + return $class->error("No data blob supplied to load by " . caller()); my($format); unless ($format = $param{Format}) { $format = $class->detect(Content => $blob);