#!/usr/bin/perl use Crypt::TripleDES; use Test::More qw(no_plan); my $des = new Crypt::TripleDES; my $plaintext = "Hallo, Welt!"; $plaintext .= " " x (8 - length($plaintext)%8) if length($plaintext)%8 != 0; # Laut Pod muss man auffuellen for (1..100) { my $passphrase = join("", map { chr rand 256 } (1)x48); my $cyphertext = $des->encrypt3 ( $plaintext, $passphrase ); my $new_plaintext = $des->decrypt3 ( $cyphertext, $passphrase ); is($plaintext, $new_plaintext); }