Commits

Toby Inkster committed e00af58 Draft

rename a couple of test files

Comments (0)

Files changed (4)

t/02decrypt.t

-use utf8;
-use Test::More tests => 5;
-use RDF::Crypt;
-
-my @strings;
-push @strings, '';
-push @strings, 'Testing: 1, 2, 3';
-push @strings, 'Hello world';
-push @strings, 'This is a very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very long string. A lot more than 512 bits.';
-push @strings, 'Schloß';
-
-my $key = Crypt::OpenSSL::RSA->generate_key(512);
-my $E   = RDF::Crypt::Encrypter->new_from_string($key->get_public_key_string);
-my $D   = RDF::Crypt::Decrypter->new_from_string($key->get_private_key_string);
-
-is(
-	$D->decrypt_text( $E->encrypt_text($_) ),
-	$_,
-) for @strings;
-
+use utf8;
+use Test::More tests => 5;
+use RDF::Crypt;
+
+my @strings;
+push @strings, '';
+push @strings, 'Testing: 1, 2, 3';
+push @strings, 'Hello world';
+push @strings, 'This is a very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very long string. A lot more than 512 bits.';
+push @strings, 'Schloß';
+
+my $key = Crypt::OpenSSL::RSA->generate_key(512);
+my $E   = RDF::Crypt::Encrypter->new_from_string($key->get_public_key_string);
+my $D   = RDF::Crypt::Decrypter->new_from_string($key->get_private_key_string);
+
+is(
+	$D->decrypt_text( $E->encrypt_text($_) ),
+	$_,
+) for @strings;
+
+use utf8;
+use Test::More tests => 10;
+use RDF::Crypt;
+
+my @strings;
+push @strings, '';
+push @strings, 'Testing: 1, 2, 3';
+push @strings, 'Hello world';
+push @strings, 'This is a very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
+	'very, very, very, very, very, very long string. A lot more than 512 bits.';
+push @strings, 'Schloß';
+
+my $key = Crypt::OpenSSL::RSA->generate_key(1024);
+my $V   = RDF::Crypt::Verifier->new_from_string($key->get_public_key_string);
+my $S   = RDF::Crypt::Signer->new_from_string($key->get_private_key_string);
+
+ok(
+	$V->verify_text($_, $S->sign_text($_)),
+) for @strings;
+
+ok(
+	not $V->verify_text($_, uc $S->sign_text($_)),
+) for @strings;

t/03verify.t

-use utf8;
-use Test::More tests => 10;
-use RDF::Crypt;
-
-my @strings;
-push @strings, '';
-push @strings, 'Testing: 1, 2, 3';
-push @strings, 'Hello world';
-push @strings, 'This is a very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very, very, very, very, very, very, very, ' .
-	'very, very, very, very, very, very long string. A lot more than 512 bits.';
-push @strings, 'Schloß';
-
-my $key = Crypt::OpenSSL::RSA->generate_key(1024);
-my $V   = RDF::Crypt::Verifier->new_from_string($key->get_public_key_string);
-my $S   = RDF::Crypt::Signer->new_from_string($key->get_private_key_string);
-
-ok(
-	$V->verify_text($_, $S->sign_text($_)),
-) for @strings;
-
-ok(
-	not $V->verify_text($_, uc $S->sign_text($_)),
-) for @strings;