Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added grammatical changes. Removed zci answer_type.

  • Loading branch information...
commit a921a1af61a20138b5dafcba777da0249d539225 1 parent ba3dac5
@digit4lfa1l digit4lfa1l authored
Showing with 12 additions and 13 deletions.
  1. +6 −7 lib/DDG/Goodie/CryptHashCheck.pm
  2. +6 −6 t/CryptHashCheck.t
View
13 lib/DDG/Goodie/CryptHashCheck.pm
@@ -4,7 +4,6 @@ package DDG::Goodie::CryptHashCheck;
use DDG::Goodie;
zci is_cached => 1;
-zci answer_type => 'crypt_hash_check';
triggers start => "hash","md5","sha";
@@ -21,17 +20,17 @@ attribution github => ['https://github.com/digit4lfa1l', 'digit4lfa1l'];
handle remainder => sub {
my ($md5) = /^[0-9a-f]{32}$/i;
- return 'This is MD5 cryptographic hash function.' if $md5;
+ return 'This is a MD5 cryptographic hash.' if $md5;
my ($sha1) = /^[0-9a-f]{40}$/i;
- return 'This is SHA-1/40 cryptographic hash function.' if $sha1;
+ return 'This is a SHA-1/40 cryptographic hash.' if $sha1;
my ($sha224) = /^[0-9a-f]{56}$/i;
- return 'This is SHA-2/224 cryptographic hash function.' if $sha224;
+ return 'This is a SHA-2/224 cryptographic hash.' if $sha224;
my ($sha256) = /^[0-9a-f]{64}$/i;
- return 'This is SHA-2/256 cryptographic hash function.' if $sha256;
+ return 'This is a SHA-2/256 cryptographic hash.' if $sha256;
my ($sha384) = /^[0-9a-f]{96}$/i;
- return 'This is SHA-2/384 cryptographic hash function.' if $sha384;
+ return 'This is a SHA-2/384 cryptographic hash.' if $sha384;
my ($sha512) = /^[0-9a-f]{128}$/i;
- return 'This is SHA-2/512 cryptographic hash function.' if $sha512;
+ return 'This is a SHA-2/512 cryptographic hash.' if $sha512;
return;
};
View
12 t/CryptHashCheck.t
@@ -5,18 +5,18 @@ use warnings;
use Test::More;
use DDG::Test::Goodie;
-zci answer_type => 'crypt_hash_check';
+zci answer_type => 'crypthashcheck';
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::CryptHashCheck
)],
- 'hash 5c0847eccfaeabf4a0207d42a2986992' => test_zci('This is MD5 cryptographic hash function.'),
- 'md5 ecaceaca62d6c47190ed6c6f94a298f28a46450fda0bd1ec8fc64bc4a7a8cd436791a35f3c4e339b7ae480c1b751f1c1' => test_zci('This is SHA-2/384 cryptographic hash function.'),
- 'sha b1d7eb51d4372c505446abca04835a101275e498' => test_zci('This is SHA-1/40 cryptographic hash function.'),
- 'hash 6286e0a5cbc030f7b2d105f594ae0afb9105c92175c6b07ff454734c23cd0bddfed77639fe59b68a70b8c78af27657f611cbe89c27f7a47b978fa9449808c19f' => test_zci('This is SHA-2/512 cryptographic hash function.'),
- 'md5 a8a35ab9036388fd42fe1d73d93ede7ec604044ba4753259fafbf718' => test_zci('This is SHA-2/224 cryptographic hash function.'),
+ 'hash 5c0847eccfaeabf4a0207d42a2986992' => test_zci('This is a MD5 cryptographic hash.'),
+ 'md5 ecaceaca62d6c47190ed6c6f94a298f28a46450fda0bd1ec8fc64bc4a7a8cd436791a35f3c4e339b7ae480c1b751f1c1' => test_zci('This is a SHA-2/384 cryptographic hash.'),
+ 'sha b1d7eb51d4372c505446abca04835a101275e498' => test_zci('This is a SHA-1/40 cryptographic hash.'),
+ 'hash 6286e0a5cbc030f7b2d105f594ae0afb9105c92175c6b07ff454734c23cd0bddfed77639fe59b68a70b8c78af27657f611cbe89c27f7a47b978fa9449808c19f' => test_zci('This is a SHA-2/512 cryptographic hash.'),
+ 'md5 a8a35ab9036388fd42fe1d73d93ede7ec604044ba4753259fafbf718' => test_zci('This is a SHA-2/224 cryptographic hash.'),
);
Please sign in to comment.
Something went wrong with that request. Please try again.