Perl & Ruby exchange AES encrypted information

こ雲淡風輕ζ 提交于 2019-12-05 19:07:28
Fayland Lam

I have something the same for Perl and php.

http://cpansearch.perl.org/src/FAYLAND/OpenSocialX-Shindig-Crypter-0.03/sample/crypt.pl http://cpansearch.perl.org/src/FAYLAND/OpenSocialX-Shindig-Crypter-0.03/sample/crypt.php

and there is a tip for you:

my $cipher = Crypt::CBC->new(
    {
        'key'         => 'length16length16',
        'cipher'      => 'Rijndael',
        'iv'          => '1234567890abcdef',
        'literal_key' => 1,
        'padding'     => 'null',
        'header'      => 'none',
        keysize       => 128 / 8
    }
);

key must be length 16. and better the length of iv is 16 chars too.

I hope it helps.

Thanks.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!