Looks like the data must be padded to be mod 16bytes Here is I think where the error is coming from -- Crypt-Twofish2-0.06/Twofish2.xs:
encrypt(self, data) Crypt::Twofish2 self SV * data ALIAS: decrypt = 1 CODE: { SV *res; STRLEN size; void *rawbytes = SvPV(data,size); if (size) { if (size % (BLOCK_SIZE >> 3)) croak ("encrypt: datasize not multiple of blocksize (% +d bits)", BLOCK_SIZE); RETVAL = NEWSV (0, size); SvPOK_only (RETVAL); SvCUR_set (RETVAL, size); if ((ix ? blockDecrypt : blockEncrypt) (&self->ci, &self->ki, rawbytes, size << 3, (void +*)SvPV_nolen(RETVAL)) < 0) croak ("block(De|En)crypt: unknown error, please repor +t"); } else RETVAL = newSVpv ("", 0); } OUTPUT: RETVAL


-Waswas

In reply to Re: Crypt::OpenPGP pgplet error by waswas-fng
in thread Crypt::OpenPGP pgplet error by boat73

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.