Crypt-RNCryptor

 view release on metacpan or  search on metacpan

t/90_rncryptor.t  view on Meta::CPAN

                encryption_salt => $vp->get($i, 'enc_salt_hex', 1),
                hmac_salt => $vp->get($i, 'hmac_salt_hex', 1),
            );
            is $plaintext, $cryptor->decrypt($ciphertext);
        }
    };

TODO: {
    local $TODO = q{
The length of encryption/hmac key have to be 32,
but the length of the data decoded each value of "enc_key_hex"/"hmac_key_hex"
is only 16. Maybe this is mistake of the test vector.
Thus, The following tests are failed because I cannot guess the real value.
    };
    subtest 'key' => sub {
        my $vp = t::assets::VectorParser->load(3, 'key');

        foreach my $i (0..$vp->num-1) {
            my $cryptor = Crypt::RNCryptor->new(
                encryption_key => pack('a32', $vp->get($i, 'enc_key_hex', 1)), # NG?
                hmac_key => pack('a32', $vp->get($i, 'hmac_key_hex', 1)), # OK?



( run in 0.716 second using v1.01-cache-2.11-cpan-26ccb49234f )