blib/lib/Crypt/OpenSSL/Blowfish/CFB64.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 11 | 11 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 0 | 2 | 0.0 |
total | 16 | 18 | 88.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Crypt::OpenSSL::Blowfish::CFB64; | ||||||
2 | |||||||
3 | 1 | 1 | 22225 | use 5.008008; | |||
1 | 4 | ||||||
1 | 46 | ||||||
4 | 1 | 1 | 6 | use strict; | |||
1 | 2 | ||||||
1 | 48 | ||||||
5 | 1 | 1 | 5 | use warnings; | |||
1 | 6 | ||||||
1 | 158 | ||||||
6 | |||||||
7 | our $VERSION = '0.01'; | ||||||
8 | |||||||
9 | require XSLoader; | ||||||
10 | XSLoader::load('Crypt::OpenSSL::Blowfish::CFB64', $VERSION); | ||||||
11 | |||||||
12 | sub encrypt_hex { | ||||||
13 | 3 | 3 | 0 | 1921 | return join '', unpack 'H*', $_[0]->encrypt( $_[1] ); | ||
14 | } | ||||||
15 | |||||||
16 | sub decrypt_hex { | ||||||
17 | 3 | 3 | 0 | 46 | $_[0]->decrypt( pack 'H*', $_[1] ); | ||
18 | } | ||||||
19 | |||||||
20 | 1; | ||||||
21 | __END__ |