Works for me...

use warnings; use strict; use Test::More tests=>2; use Crypt::CBC; my $cipher = Crypt::CBC->new( -cipher => 'Crypt::Cipher::AES', -key => pack('H*','01F0E0D0C0B0A090807060504030201001F0E0D +0C0B0A0908070605040302010'), -iv => pack('H*','8006e3b6dbdb4865e079d0543c6007bc'), -padding => 'none', -header => 'none', -keylength => '256' , -literal_key => 1 ); # Test cases from http://aes.online-domain-tools.com/ is $cipher->encrypt(pack('H*','313233343536373839303132333435363237383 +2343634303031305468697320697320612074657374206D657373616765FFFFFFFFFF +FFFFFFFFFFFFFFFFFFFF')), pack('H*','d899b35ce2b37036de3885227d8ca6b8ecc82c3f21ae89123b6d149 +67301b3bf08596e32df12de93621f15f90e6ea4b969a752c3f50fb771b8821eb0e606 +cf6c'); is $cipher->decrypt(pack('H*','313233343536373839303132333435363237383 +2343634303031305468697320697320612074657374206D657373616765FFFFFFFFFF +FFFFFFFFFFFFFFFFFFFF')), pack('H*','d97548a7925ff9d1f3a5fd4dac00c120a3faa51c931c203ec8cbad0 +25e3574299d1043fb51865a47469100a15e96203621396b7ec86d8202869b4fb1039f +aa8e');

In reply to Re: perl aes-256-cbc by haukex
in thread perl aes-256-cbc by perlmdl

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.