in reply to Re: Encrypt text in perl and decrypt in a windows tool
in thread Encrypt text in perl and decrypt in a windows tool

Below is my code: -----------------------
use Crypt::CBC; use Crypt::Blowfish; my $key = "abcdefghijlmnopqrstuvwxyz"; my $cipher = Crypt::CBC->new( -key => "$key", -cipher => 'Blowfish', ); my $ciphertext = $cipher->encrypt("3769-198501-21002"); my $plaintext = $cipher->decrypt($ciphertext); print "$key\n"; print "$ciphertext\n"; print "$plaintext\n";
------------------------------ The value of "$ciphertext" is send as part of mail body. I want to decrypt the value of "$ciphertext" using a Windows based tool. Please advice

Replies are listed 'Best First'.
Re^3: Encrypt text in perl and decrypt in a windows tool
by jettero (Monsignor) on Jun 10, 2010 at 15:15 UTC
    I really don't think the platform matters at all. This just isn't a "windows" vs. "<platform of choice>" question. Basically, it sounds to me like you need to parse the email body and feed it to encrypt()/decrypt(). You're either going to need to figure how how to do that (see perlretut and Mail::Box and things like that); or try to get a co-worker to do it. If you're looking for a windows specific tool (other than Perl I guess), this just isn't the right site.

    UPDATE: It sounds like you don't need Perl, you need a windows email tool. This just isn't a Perl question I guess.

      I just want to encrypt a string and send the encrypted output as part of the mail body which will contain other data. The end user has to only copy the encrypted part from the mail and try to decrypt it in a window based tool. I don't need the whole mail body to be encrypted/decrypted.