digest-whirlpool 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/digest-whirlpool.gemspec +49 -0
- data/ext/digest/whirlpool/extconf.rb +1 -3
- data/ext/digest/whirlpool/whirlpool.c +0 -4
- data/test/test_digest-whirlpool.rb +49 -0
- metadata +28 -13
data/.document
ADDED
data/.gitignore
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "digest-whirlpool"
|
8
|
+
gem.summary = %Q{A Digest module implementing the Whirlpool hashing algorithm}
|
9
|
+
gem.description = <<-EOS
|
10
|
+
This is a Digest module implementing the Whirlpool hashing algorithm.
|
11
|
+
The size of a Whirlpool hash value is 512 bits.
|
12
|
+
EOS
|
13
|
+
gem.email = "knu@idaemons.org"
|
14
|
+
gem.homepage = "http://github.com/knu/ruby-digest-extra"
|
15
|
+
gem.authors = ["Akinori MUSHA"]
|
16
|
+
gem.extensions.concat FileList["ext/**/extconf.rb"]
|
17
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional set
|
18
|
+
end
|
19
|
+
Jeweler::GemcutterTasks.new
|
20
|
+
rescue LoadError
|
21
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'rake/testtask'
|
25
|
+
Rake::TestTask.new(:test) do |test|
|
26
|
+
test.libs << 'lib' << 'test'
|
27
|
+
test.pattern = 'test/**/test_*.rb'
|
28
|
+
test.verbose = true
|
29
|
+
end
|
30
|
+
|
31
|
+
begin
|
32
|
+
require 'rcov/rcovtask'
|
33
|
+
Rcov::RcovTask.new do |test|
|
34
|
+
test.libs << 'test'
|
35
|
+
test.pattern = 'test/**/test_*.rb'
|
36
|
+
test.verbose = true
|
37
|
+
end
|
38
|
+
rescue LoadError
|
39
|
+
task :rcov do
|
40
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
task :test => :check_dependencies
|
45
|
+
|
46
|
+
task :default => :test
|
47
|
+
|
48
|
+
require 'rake/rdoctask'
|
49
|
+
Rake::RDocTask.new do |rdoc|
|
50
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
51
|
+
|
52
|
+
rdoc.rdoc_dir = 'rdoc'
|
53
|
+
rdoc.title = "digest-whirlpool #{version}"
|
54
|
+
rdoc.rdoc_files.include('README*')
|
55
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
56
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.1
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{digest-whirlpool}
|
8
|
+
s.version = "1.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = [%q{Akinori MUSHA}]
|
12
|
+
s.date = %q{2011-09-27}
|
13
|
+
s.description = %q{This is a Digest module implementing the Whirlpool hashing algorithm.
|
14
|
+
The size of a Whirlpool hash value is 512 bits.
|
15
|
+
}
|
16
|
+
s.email = %q{knu@idaemons.org}
|
17
|
+
s.extensions = [%q{ext/digest/whirlpool/extconf.rb}]
|
18
|
+
s.files = [
|
19
|
+
".document",
|
20
|
+
".gitignore",
|
21
|
+
"LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"digest-whirlpool.gemspec",
|
26
|
+
"ext/digest/whirlpool/depend",
|
27
|
+
"ext/digest/whirlpool/extconf.rb",
|
28
|
+
"ext/digest/whirlpool/whirlpool-algorithm.c",
|
29
|
+
"ext/digest/whirlpool/whirlpool-algorithm.h",
|
30
|
+
"ext/digest/whirlpool/whirlpool-constants.h",
|
31
|
+
"ext/digest/whirlpool/whirlpool-portability.h",
|
32
|
+
"ext/digest/whirlpool/whirlpool.c",
|
33
|
+
"test/test_digest-whirlpool.rb"
|
34
|
+
]
|
35
|
+
s.homepage = %q{http://github.com/knu/ruby-digest-extra}
|
36
|
+
s.require_paths = [%q{lib}]
|
37
|
+
s.rubygems_version = %q{1.8.8}
|
38
|
+
s.summary = %q{A Digest module implementing the Whirlpool hashing algorithm}
|
39
|
+
|
40
|
+
if s.respond_to? :specification_version then
|
41
|
+
s.specification_version = 3
|
42
|
+
|
43
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
+
else
|
45
|
+
end
|
46
|
+
else
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'digest/whirlpool'
|
5
|
+
rescue LoadError
|
6
|
+
require 'rubygems'
|
7
|
+
require 'digest/whirlpool'
|
8
|
+
end
|
9
|
+
|
10
|
+
class TC_Digest_Whirlpool < Test::Unit::TestCase
|
11
|
+
def cases
|
12
|
+
[
|
13
|
+
{
|
14
|
+
:data => '',
|
15
|
+
:hexdigest => '19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3',
|
16
|
+
}, {
|
17
|
+
:data => 'a',
|
18
|
+
:hexdigest => '8aca2602792aec6f11a67206531fb7d7f0dff59413145e6973c45001d0087b42d11bc645413aeff63a42391a39145a591a92200d560195e53b478584fdae231a',
|
19
|
+
}, {
|
20
|
+
:data => 'abc',
|
21
|
+
:hexdigest => '4e2448a4c6f486bb16b6562c73b4020bf3043e3a731bce721ae1b303d97e6d4c7181eebdb6c57e277d0e34957114cbd6c797fc9d95d8b582d225292076d4eef5',
|
22
|
+
}, {
|
23
|
+
:data => 'message digest',
|
24
|
+
:hexdigest => '378c84a4126e2dc6e56dcc7458377aac838d00032230f53ce1f5700c0ffb4d3b8421557659ef55c106b4b52ac5a4aaa692ed920052838f3362e86dbd37a8903e',
|
25
|
+
}, {
|
26
|
+
:data => 'abcdefghijklmnopqrstuvwxyz',
|
27
|
+
:hexdigest => 'f1d754662636ffe92c82ebb9212a484a8d38631ead4238f5442ee13b8054e41b08bf2a9251c30b6a0b8aae86177ab4a6f68f673e7207865d5d9819a3dba4eb3b',
|
28
|
+
}, {
|
29
|
+
:data => 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
|
30
|
+
:hexdigest => 'dc37e008cf9ee69bf11f00ed9aba26901dd7c28cdec066cc6af42e40f82f3a1e08eba26629129d8fb7cb57211b9281a65517cc879d7b962142c65f5a7af01467',
|
31
|
+
}, {
|
32
|
+
:data => '1234567890' * 8,
|
33
|
+
:hexdigest => '466ef18babb0154d25b9d38a6414f5c08784372bccb204d6549c4afadb6014294d5bd8df2a6c44e538cd047b2681a51a2c60481e88c5a20b2c2a80cf3a9a083b',
|
34
|
+
}, {
|
35
|
+
:data => 'abcdbcdecdefdefgefghfghighijhijk',
|
36
|
+
:hexdigest => '2a987ea40f917061f5d6f0a0e4644f488a7a5a52deee656207c562f988e95c6916bdc8031bc5be1b7b947639fe050b56939baaa0adff9ae6745b7b181c3be3fd',
|
37
|
+
}, {
|
38
|
+
:data => 'a' * (10 ** 6),
|
39
|
+
:hexdigest => '0c99005beb57eff50a7cf005560ddf5d29057fd86b20bfd62deca0f1ccea4af51fc15490eddc47af32bb2b66c34ff9ad8c6008ad677f77126953b226e4ed8b01',
|
40
|
+
}
|
41
|
+
]
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_s_hexdigest
|
45
|
+
cases.each { |h|
|
46
|
+
assert_equal(h[:hexdigest], Digest::Whirlpool.hexdigest(h[:data]))
|
47
|
+
}
|
48
|
+
end
|
49
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: digest-whirlpool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Akinori MUSHA
|
@@ -9,8 +15,7 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
13
|
-
default_executable:
|
18
|
+
date: 2011-09-27 00:00:00 Z
|
14
19
|
dependencies: []
|
15
20
|
|
16
21
|
description: |
|
@@ -22,10 +27,16 @@ executables: []
|
|
22
27
|
|
23
28
|
extensions:
|
24
29
|
- ext/digest/whirlpool/extconf.rb
|
25
|
-
extra_rdoc_files:
|
30
|
+
extra_rdoc_files: []
|
31
|
+
|
32
|
+
files:
|
33
|
+
- .document
|
34
|
+
- .gitignore
|
26
35
|
- LICENSE
|
27
36
|
- README.rdoc
|
28
|
-
|
37
|
+
- Rakefile
|
38
|
+
- VERSION
|
39
|
+
- digest-whirlpool.gemspec
|
29
40
|
- ext/digest/whirlpool/depend
|
30
41
|
- ext/digest/whirlpool/extconf.rb
|
31
42
|
- ext/digest/whirlpool/whirlpool-algorithm.c
|
@@ -33,33 +44,37 @@ files:
|
|
33
44
|
- ext/digest/whirlpool/whirlpool-constants.h
|
34
45
|
- ext/digest/whirlpool/whirlpool-portability.h
|
35
46
|
- ext/digest/whirlpool/whirlpool.c
|
36
|
-
-
|
37
|
-
- README.rdoc
|
38
|
-
has_rdoc: true
|
47
|
+
- test/test_digest-whirlpool.rb
|
39
48
|
homepage: http://github.com/knu/ruby-digest-extra
|
40
49
|
licenses: []
|
41
50
|
|
42
51
|
post_install_message:
|
43
|
-
rdoc_options:
|
44
|
-
|
52
|
+
rdoc_options: []
|
53
|
+
|
45
54
|
require_paths:
|
46
55
|
- lib
|
47
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
48
58
|
requirements:
|
49
59
|
- - ">="
|
50
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
51
64
|
version: "0"
|
52
|
-
version:
|
53
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
54
67
|
requirements:
|
55
68
|
- - ">="
|
56
69
|
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
57
73
|
version: "0"
|
58
|
-
version:
|
59
74
|
requirements: []
|
60
75
|
|
61
76
|
rubyforge_project:
|
62
|
-
rubygems_version: 1.
|
77
|
+
rubygems_version: 1.8.8
|
63
78
|
signing_key:
|
64
79
|
specification_version: 3
|
65
80
|
summary: A Digest module implementing the Whirlpool hashing algorithm
|