Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: File::Slurp and encryption

by Solostian (Beadle)
on Sep 21, 2005 at 21:01 UTC ( #493967=note: print w/replies, xml ) Need Help??


in reply to Re: File::Slurp and encryption
in thread File::Slurp and encryption

The encrypted file is an ASCII text originally. But an encrypted file can be handled in binary mode. I'll give it a try

As for the Pure Perl cipher, I'm still hesitating. I know the biggest benefit would come from there but I still do not know the deployment server's OS... Any suggestion?

Replies are listed 'Best First'.
Re^3: File::Slurp and encryption
by ikegami (Patriarch) on Sep 21, 2005 at 22:10 UTC
    You could try to use the C cypher and fall back on the Perl one. Something like
    my $cypher; if (eval { require Crypt::Twofish }) { $cypher = 'Crypt::Twofish'; } elsif (eval { require Crypt::Twofish_PP }) { warn("Crypt::Twofish not found. Falling back to slower Crypt::Twofi +sh_PP\n") if $DEBUG; $cypher = 'Crypt::Twofish_PP'; } else { die("Neither Crypt::Twofish nor Crypt::Twofish_PP was found. Aborti +ng"); }
    or
    my $cypher; foreach (qw( Crypt::Twofish Crypt::Twofish_PP )) { my $mod = $_; my $file = $_; $file =~ s{::}{/}g; $file .= '.pm'; if (eval { require $file }) { $cypher = $mod; last; } } die("No acceptable encryption algorithm found. Aborting") if not defined $cypher;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://493967]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2023-01-30 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?