Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

i am intrested to encrypt my a/c no using Crypt::Blowfish_PP.pm How to use it ??????????

Replies are listed 'Best First'.
Re: How to do encryption ?
by TStanley (Canon) on Mar 23, 2001 at 09:53 UTC
    Here is a good example:
    #!/usr/bin/perl -w use strict; use Crypt::Blowfish_PP; my $key="abcdefghijklmnopqrstuvwxyz"; my $data="This is what I want to encrypt"; my $bf = Crypt::Blowfish_PP->new($key); my $encrypted_data = $bf->encrypt($data); my $decrypted_data = $bf->decrypt($encrypted_data);
    Also, please look at the documentation for the module as well. It will explain how to do it.

    TStanley
    In the end, there can be only one!
      I came across this node and thought I'd give it a try as it is something I could use. But after installing the module and trying your example I get a 'Can't locate object method "new" via package "Crypt::Blowfish" ' error when I run it. Did anybody else run into this or better yet can somebody explain what I may be doing wrong?

      Thanks,

      THRAK
        The module that I used above is Crypt::Blowfish_PP, which is a
        pure perl version of the Crypt::Blowfish module. Check your use line
        to make sure you are using Crypt::Blowfish_PP and not Crypt::Blowfish

        TStanley
        In the end, there can be only one!