perl script to crypto++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vermarajeev
    New Member
    • Aug 2006
    • 180

    perl script to crypto++

    Hi guys,
    I have written code to encrypt and decrypt files using perl script. Please help me to port below code to crypto++ library.

    //ENCRYPTION
    [CODE=perl]
    my $cipher = Crypt::CBC->new(
    -cipher => "Crypt::Rijndae l",
    -key => $key,
    -header => 'salt',
    );
    $cipher->start( 'encrypting' );

    while ( read( $original_file, $buffer, 1024 ) ) {
    print $encrypted_file $cipher->crypt( $buffer );
    }[/CODE]


    //DECRYPTION
    [CODE=perl]
    ]my $cipher = Crypt::CBC->new(
    -cipher => "Crypt::OpenSSL ::AES",
    -key => $key,
    -header => 'salt',
    );
    $cipher->start( 'decrypting' );

    while ( read( $encrypted_file , $buffer, 1024 ) ) {
    print $decrypted_file $cipher->crypt( $buffer );
    }[/CODE]

    I'm aware of Rijndael and can find the alternative for the same in crypto++ library but I'm unable to find Crypt::OpenSSL: :AES in crypto++ library.
    Please help me guys.
    Thanks
    Last edited by miller; Aug 23 '07, 01:55 AM. Reason: Code Tag and ReFormatting
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Let me see if I get this correctly. You have all this Perl code to do encryption/decryption. You are now in the process of porting this code from Perl to C++, and will be using the crypto++ C++ library to do it?

    IMHO, this is not a Perl question, but is instead a C/C++ question. We code Perl, which is already written above, not C++. This question should be moved, unless of course you have a specific question about Perl.

    Regards,

    Jeff

    Comment

    • vermarajeev
      New Member
      • Aug 2006
      • 180

      #3
      Thanks,
      Please do the needful and ship it to C++ section.

      Comment

      Working...