Skip to content
This repository
Browse code

Added grammatical changes. Removed zci answer_type.

  • Loading branch information...
commit a921a1af61a20138b5dafcba777da0249d539225 1 parent ba3dac5
Bartek authored
13  lib/DDG/Goodie/CryptHashCheck.pm
@@ -4,7 +4,6 @@ package DDG::Goodie::CryptHashCheck;
4 4
 use DDG::Goodie;
5 5
 
6 6
 zci is_cached => 1;
7  
-zci answer_type => 'crypt_hash_check';
8 7
 
9 8
 triggers start => "hash","md5","sha";
10 9
 
@@ -21,17 +20,17 @@ attribution github => ['https://github.com/digit4lfa1l', 'digit4lfa1l'];
21 20
 
22 21
 handle remainder => sub {
23 22
 	my ($md5) = /^[0-9a-f]{32}$/i;
24  
-		return 'This is MD5 cryptographic hash function.' if $md5;
  23
+		return 'This is a MD5 cryptographic hash.' if $md5;
25 24
 	my ($sha1)  = /^[0-9a-f]{40}$/i;
26  
-		return 'This is SHA-1/40 cryptographic hash function.' if $sha1;
  25
+		return 'This is a SHA-1/40 cryptographic hash.' if $sha1;
27 26
 	my ($sha224) = /^[0-9a-f]{56}$/i;
28  
-		return 'This is SHA-2/224 cryptographic hash function.' if $sha224;
  27
+		return 'This is a SHA-2/224 cryptographic hash.' if $sha224;
29 28
 	my ($sha256) = /^[0-9a-f]{64}$/i;
30  
-		return 'This is SHA-2/256 cryptographic hash function.' if $sha256;
  29
+		return 'This is a SHA-2/256 cryptographic hash.' if $sha256;
31 30
 	my ($sha384) = /^[0-9a-f]{96}$/i;
32  
-		return 'This is SHA-2/384 cryptographic hash function.' if $sha384;
  31
+		return 'This is a SHA-2/384 cryptographic hash.' if $sha384;
33 32
 	my ($sha512) = /^[0-9a-f]{128}$/i;
34  
-		return 'This is SHA-2/512 cryptographic hash function.' if $sha512; 
  33
+		return 'This is a SHA-2/512 cryptographic hash.' if $sha512; 
35 34
 	return;	
36 35
 };
37 36
 
12  t/CryptHashCheck.t
@@ -5,18 +5,18 @@ use warnings;
5 5
 use Test::More;
6 6
 use DDG::Test::Goodie;
7 7
 
8  
-zci answer_type => 'crypt_hash_check';
  8
+zci answer_type => 'crypthashcheck';
9 9
 zci is_cached => 1;
10 10
 
11 11
 ddg_goodie_test(
12 12
 	[qw(
13 13
 		DDG::Goodie::CryptHashCheck
14 14
 	)],
15  
-	'hash 5c0847eccfaeabf4a0207d42a2986992' => test_zci('This is MD5 cryptographic hash function.'),
16  
-	'md5 ecaceaca62d6c47190ed6c6f94a298f28a46450fda0bd1ec8fc64bc4a7a8cd436791a35f3c4e339b7ae480c1b751f1c1' => test_zci('This is SHA-2/384 cryptographic hash function.'),
17  
-	'sha b1d7eb51d4372c505446abca04835a101275e498' => test_zci('This is SHA-1/40 cryptographic hash function.'),
18  
-	'hash 6286e0a5cbc030f7b2d105f594ae0afb9105c92175c6b07ff454734c23cd0bddfed77639fe59b68a70b8c78af27657f611cbe89c27f7a47b978fa9449808c19f' => test_zci('This is SHA-2/512 cryptographic hash function.'),
19  
-	'md5 a8a35ab9036388fd42fe1d73d93ede7ec604044ba4753259fafbf718' => test_zci('This is SHA-2/224 cryptographic hash function.'),
  15
+	'hash 5c0847eccfaeabf4a0207d42a2986992' => test_zci('This is a MD5 cryptographic hash.'),
  16
+	'md5 ecaceaca62d6c47190ed6c6f94a298f28a46450fda0bd1ec8fc64bc4a7a8cd436791a35f3c4e339b7ae480c1b751f1c1' => test_zci('This is a SHA-2/384 cryptographic hash.'),
  17
+	'sha b1d7eb51d4372c505446abca04835a101275e498' => test_zci('This is a SHA-1/40 cryptographic hash.'),
  18
+	'hash 6286e0a5cbc030f7b2d105f594ae0afb9105c92175c6b07ff454734c23cd0bddfed77639fe59b68a70b8c78af27657f611cbe89c27f7a47b978fa9449808c19f' => test_zci('This is a SHA-2/512 cryptographic hash.'),
  19
+	'md5 a8a35ab9036388fd42fe1d73d93ede7ec604044ba4753259fafbf718' => test_zci('This is a SHA-2/224 cryptographic hash.'),
20 20
 	
21 21
 );
22 22
 

0 notes on commit a921a1a

Please sign in to comment.
Something went wrong with that request. Please try again.