Professional Web Applications Themes

Crypt::CBC Can't call method "blocksize" on unblessed reference - PERL Modules

I have a problem with the Crypt:CBC Module. When I'm running my little sample script I allway get the following error: Can't call method "blocksize" on unblessed reference at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Crypt/CBC.pm line 35. my script: #!/usr/bin/perl -w use strict; use Crypt::CBC; my ($cipher, $ciphertext, $plaintext); $cipher = Crypt::CBC->new( {'key' => 'my secret key', 'cipher' => 'fish', 'iv' => '$KJh#(}q', 'regenerate_key' => 0, # default true 'padding' => 'space', 'prepend_iv' => 0 }); $ciphertext = $cipher->encrypt("This data is hush hush"); print $ciphertext; print "\n\n"; $plaintext = $cipher->decrypt($ciphertext); print $plaintext; print "\n\n"; I'm running perl v5.6.1 on a SUSE 8.0 Linux Box. If ...

  1. #1

    Default Crypt::CBC Can't call method "blocksize" on unblessed reference

    I have a problem with the Crypt:CBC Module.

    When I'm running my little sample script I allway get the following
    error:

    Can't call method "blocksize" on unblessed reference at
    /usr/lib/perl5/site_perl/5.6.1/i586-linux/Crypt/CBC.pm line 35.

    my script:

    #!/usr/bin/perl -w
    use strict;

    use Crypt::CBC;

    my ($cipher, $ciphertext, $plaintext);

    $cipher = Crypt::CBC->new( {'key' => 'my secret key',
    'cipher' => 'fish',
    'iv' => '$KJh#(}q',
    'regenerate_key' => 0, # default true
    'padding' => 'space',
    'prepend_iv' => 0
    });

    $ciphertext = $cipher->encrypt("This data is hush hush");
    print $ciphertext;
    print "\n\n";

    $plaintext = $cipher->decrypt($ciphertext);
    print $plaintext;
    print "\n\n";


    I'm running perl v5.6.1 on a SUSE 8.0 Linux Box.

    If someone could offer any suggestion, I would be appreciative.

    Thank you

    Yves Egli
    Yves Guest

  2. #2

    Default Re: Crypt::CBC Can't call method "blocksize" on unblessed reference

    Hello
    "Yves" <yvesegli> wrote in message news:9b8012bd.0407120749.74ca3864posting.google.c om...
    > I have a problem with the Crypt:CBC Module.
    >
    > When I'm running my little sample script I allway get the following
    > error:
    >
    > Can't call method "blocksize" on unblessed reference at
    > /usr/lib/perl5/site_perl/5.6.1/i586-linux/Crypt/CBC.pm line 35.
    >
    > my script:
    >
    > #!/usr/bin/perl -w
    > use strict;
    >
    > use Crypt::CBC;
    >
    > my ($cipher, $ciphertext, $plaintext);
    >
    > $cipher = Crypt::CBC->new( {'key' => 'my secret key',
    > 'cipher' => 'fish',
    > 'iv' => '$KJh#(}q',
    > 'regenerate_key' => 0, # default true
    > 'padding' => 'space',
    > 'prepend_iv' => 0
    > });
    >
    > $ciphertext = $cipher->encrypt("This data is hush hush");
    > print $ciphertext;
    > print "\n\n";
    >
    > $plaintext = $cipher->decrypt($ciphertext);
    > print $plaintext;
    > print "\n\n";
    >
    >
    > I'm running perl v5.6.1 on a SUSE 8.0 Linux Box.
    >
    > If someone could offer any suggestion, I would be appreciative.
    >
    > Thank you
    >
    > Yves Egli
    I see your version of Perl, but your versions of
    Crypt-CBC and Crypt-fish might need updating.

    Your code works for me on:
    Win2k sp3
    Perl 5.8.1 Build 807 (x86-multithread)

    Crypt-CBC 2.09
    Crypt-fish 2.08

    My notes on Crypt-CBC:
    CBC is rather limited in its method of
    deriving keys from passwords. fish
    can use a key length of up to
    56 bytes (448 bits). CBC only uses the
    MD5 hash for key derivation.

    To produce a key longer than 128 bits
    with CBC requires some kind of PRF. I made
    a module which has 3 different PRFs for
    making extended keys from a password.

    gnu valued customer Guest

  3. #3

    Default Re: Crypt::CBC Can't call method "blocksize" on unblessed reference

    see below
    "gnu valued customer" <tlviewer> wrote in message news:auBIc.55000$qw1.14554nwrddc01.gnilink.net...
    Hello
    "Yves" <yvesegli> wrote in message news:9b8012bd.0407120749.74ca3864posting.google.c om...
    > I have a problem with the Crypt:CBC Module.
    >
    > When I'm running my little sample script I allway get the following
    > error:
    >
    > Can't call method "blocksize" on unblessed reference at
    > /usr/lib/perl5/site_perl/5.6.1/i586-linux/Crypt/CBC.pm line 35.
    >
    > my script:
    >
    > #!/usr/bin/perl -w
    > use strict;
    >
    > use Crypt::CBC;
    >
    > my ($cipher, $ciphertext, $plaintext);
    >
    > $cipher = Crypt::CBC->new( {'key' => 'my secret key',
    > 'cipher' => 'fish',
    > 'iv' => '$KJh#(}q',
    > 'regenerate_key' => 0, # default true
    > 'padding' => 'space',
    > 'prepend_iv' => 0
    > });
    >
    > $ciphertext = $cipher->encrypt("This data is hush hush");
    > print $ciphertext;
    > print "\n\n";
    >
    > $plaintext = $cipher->decrypt($ciphertext);
    > print $plaintext;
    > print "\n\n";
    >
    >
    > I'm running perl v5.6.1 on a SUSE 8.0 Linux Box.
    >
    > If someone could offer any suggestion, I would be appreciative.
    >
    > Thank you
    >
    > Yves Egli
    I see your version of Perl, but your versions of
    Crypt-CBC and Crypt-fish might need updating.

    Your code works for me on:
    Win2k sp3
    Perl 5.8.1 Build 807 (x86-multithread)

    Crypt-CBC 2.09
    Crypt-fish 2.08

    My notes on Crypt-CBC:
    CBC is rather limited in its method of
    deriving keys from passwords. fish
    can use a key length of up to
    56 bytes (448 bits). CBC only uses the
    MD5 hash for key derivation.

    To produce a key longer than 128 bits
    with CBC requires some kind of PRF. I made
    a module which has 3 different PRFs for
    making extended keys from a password.

    [url]http://4.11.211.97/Crypt-CBC-KDF.zip[/url]

    The zip above has 2 Perl scripts that
    both do DES_EDE3 with a 192 bit key.
    The first script uses Crypt-CBC and the
    2nd uses Inline-C, calling the Win32 CryptoAPI.

    What's interesting about interoperating these
    2 is that the CryptoAPI has a custom PRF for
    key derivation that I have ported to
    Crypt-CBC-KDF.

    regards,
    tlviewer
    gnu valued customer Guest

  4. #4

    Default Re: Crypt::CBC Can't call method "blocksize" on unblessed reference

    "gnu valued customer" <tlviewer> wrote in message news:<nuCIc.49235$6e7.23589nwrddc03.gnilink.net>. ..
    > see below
    > "gnu valued customer" <tlviewer> wrote in message
    > news:auBIc.55000$qw1.14554nwrddc01.gnilink.net...
    > Hello
    > "Yves" <yvesegli> wrote in message
    > news:9b8012bd.0407120749.74ca3864posting.google.c om...
    > > I have a problem with the Crypt:CBC Module.
    > >
    > > When I'm running my little sample script I allway get the following
    > > error:
    > >
    > > Can't call method "blocksize" on unblessed reference at
    > > /usr/lib/perl5/site perl/5.6.1/i586-linux/Crypt/CBC.pm line 35.
    > >
    > > my script:
    > >
    > > #!/usr/bin/perl -w
    > > use strict;
    > >
    > > use Crypt::CBC;
    > >
    > > my ($cipher, $ciphertext, $plaintext);
    > >
    > > $cipher = Crypt::CBC->new( {'key' => 'my secret
    > key',
    > > 'cipher' => 'fish',
    > > 'iv' => '$KJh#(}q',
    > > 'regenerate key' => 0, # default
    > true
    > > 'padding' => 'space',
    > > 'prepend iv' => 0
    > > });
    > >
    > > $ciphertext = $cipher->encrypt("This data is hush hush");
    > > print $ciphertext;
    > > print "\n\n";
    > >
    > > $plaintext = $cipher->decrypt($ciphertext);
    > > print $plaintext;
    > > print "\n\n";
    > >
    > >
    > > I'm running perl v5.6.1 on a SUSE 8.0 Linux Box.
    > >
    > > If someone could offer any suggestion, I would be appreciative.
    > >
    > > Thank you
    > >
    > > Yves Egli
    >
    > I see your version of Perl, but your versions of
    > Crypt-CBC and Crypt-fish might need updating.
    >
    > Your code works for me on:
    > Win2k sp3
    > Perl 5.8.1 Build 807 (x86-multithread)
    >
    > Crypt-CBC 2.09
    > Crypt-fish 2.08
    >
    > My notes on Crypt-CBC:
    > CBC is rather limited in its method of
    > deriving keys from passwords. fish
    > can use a key length of up to
    > 56 bytes (448 bits). CBC only uses the
    > MD5 hash for key derivation.
    >
    > To produce a key longer than 128 bits
    > with CBC requires some kind of PRF. I made
    > a module which has 3 different PRFs for
    > making extended keys from a password.
    >
    > [url]http://4.11.211.97/Crypt-CBC-KDF.zip[/url]
    >
    > The zip above has 2 Perl scripts that
    > both do DES EDE3 with a 192 bit key.
    > The first script uses Crypt-CBC and the
    > 2nd uses Inline-C, calling the Win32 CryptoAPI.
    >
    > What's interesting about interoperating these
    > 2 is that the CryptoAPI has a custom PRF for
    > key derivation that I have ported to
    > Crypt-CBC-KDF.
    >
    > regards,
    > tlviewer
    I had following versions installed:

    Crypt-CBC 2.08
    Crypt-fish 2.09

    now I have upgraded the Crypt-CBC to Version 2.09 but still the same error.

    Then I've tried it on a other machine with the newest versions

    Crypt-CBC 2.12
    Crypt-fish 2.09

    and again same error.
    Yves Guest

Similar Threads

  1. "Can't call method "disconnect" on an undefined value..."
    By Metalbomer in forum PERL Modules
    Replies: 5
    Last Post: March 6th, 10:05 PM
  2. Replies: 2
    Last Post: March 23rd, 07:28 PM
  3. Replies: 0
    Last Post: May 24th, 07:35 PM
  4. Spreadsheet::PExcel Can't call method "sheets"
    By Wouter Beck in forum PERL Modules
    Replies: 0
    Last Post: February 13th, 11:23 PM
  5. Can't call method "uri" on an undefined value
    By chad phillips in forum PERL Miscellaneous
    Replies: 0
    Last Post: September 15th, 04:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139