From the crytolab page Note: The block ciphers implemented for CryptoLab use ECB mode instead of the more common CBC mode used for encryption. It is known that ECB mode is much less secure than other modes of operation.

So, using Crypt::CBC is not an option as the generated cipher is always going to be different. I tried using Crypt::ECB module but that did not yield the desired results. Maybe, setting a different keysize might help

Their developer page might have some information as to how random keys are generated from given passwords (read cipher keys).

use Crypt::ECB; use Crypt::Blowfish; my $key = shift or die "Usage crypt_ecb_bf <keytoencrypt>\n"; my $crypt = Crypt::ECB->new; $crypt->padding(PADDING_AUTO); $crypt->cipher('Blowfish') || die $crypt->errstring; $crypt->key("$key"); my $ciphertext = $crypt->encrypt_hex("Hello World!"); #since cryptolab +s is outputting hex my $plaintext = $crypt->decrypt_hex($ciphertext); print "$key\n"; print "$ciphertext\n"; print "$plaintext\n";
Hope is a Heuristic Search.

In reply to Re: Encrypt text in perl and decrypt in a windows tool by hemanth.damecharla
in thread Encrypt text in perl and decrypt in a windows tool by asidnayak

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.