Help language development. Donate to The Perl Foundation

Crypt::Libcrypt cpan:JSTOWE last updated on 2019-12-16

t/020-crypt.t
#!perl6

use v6;
use Test;

use Crypt::Libcrypt;

my $pass = 'abcde12345';

ok my $crypted = crypt($pass, 'HJ'), "crypt for DES";

is crypt($pass, $crypted), $crypted, "and crypting the pw with the crypt-text returns the same";

if crypt-preferred-method() {
    ok my $crypted = crypt($pass), "crypt for preferred method";
    is crypt($pass, $crypted), $crypted, "and crypting the pw with the crypt-text returns the same";
}


done-testing();
# vim: expandtab shiftwidth=4 ft=perl6