Crypt-Cipher-Vigenere

 view release on metacpan or  search on metacpan

t/01-main.t  view on Meta::CPAN

  is($v->decode('LXFOPVEFRNHR'), 'ATTACKATDAWN', 'decode key case');
}

{ # text is case-preserving
  my $v = Crypt::Cipher::Vigenere->new('LeMoN');
  is($v->encode('AttackAtDawn'), 'LxfopvEfRnhr', 'encode text case');
  $v->reset;
  is($v->decode('LxfopvEfRnhr'), 'AttackAtDawn', 'decode text case');
}

{ # text transparently passes through chars other than A-Z
  my $v = Crypt::Cipher::Vigenere->new('LeMoN');
  is($v->encode(q{⚔️ Attaque à l'aube!}), q{⚔️ Lxfodfi à x'ohmi!}, 'encode transparency');
  $v->reset;
  is($v->decode(q{⚔️ Lxfodfi à x'ohmi!}), q{⚔️ Attaque à l'aube!}, 'decode transparency');
}

# finish
done_testing();



( run in 1.087 second using v1.01-cache-2.11-cpan-0a6323c29d9 )