digest-whirlpool 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78e1353249562970b95f98a0eb63acb1e5a08f24
4
- data.tar.gz: ba52002ff6d70224463b0cfe113f7734f69cdf32
3
+ metadata.gz: 3d3f4a83e5028c7705359668c0048492c84f1135
4
+ data.tar.gz: 1a994f87d12fef5743c3727b4907ea62ebf2931b
5
5
  SHA512:
6
- metadata.gz: dc5ec13a3b930aa4f41a84308947f9e08f9592df7e2b76c359ce74cacbe976183f1644a1ddf28816d1a233edbb68a4f41d25c3f26e98a242841a6bc1840fe3ca
7
- data.tar.gz: 3d5bc2feba262f7bbce142da1e57b8f8c3bce02449e3cb957795cd6649a8ccbd4bf76629a05e5b886d0bee696d3bc3b2e5d7645bb874bfd030fc269e28b2d01d
6
+ metadata.gz: a59c7d6d98bf2016f063f52b9739cd6d12b72ea40fdf9dfb78fbffb84fc6261cc1e7f0dcc7a7865d8d848d702bd023758ad809c3389336909496a5ccb55830b1
7
+ data.tar.gz: ff676ad33c89b2a71c3778129e3aeee9351a0cfeda64975271d469864a7c6ebc083bdfb2e1e9d9be3fb9735aacd6848a318e1cce38d46526ea18c08bd4a9e763
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ sudo: false
3
+ rvm:
4
+ - 2.2
5
+ - 2.3
6
+ - 2.4
7
+ - ruby-head
8
+ before_script:
9
+ - rake compile
data/LICENSE CHANGED
@@ -37,6 +37,27 @@ whirlpool-portability.h:
37
37
 
38
38
  For the rest:
39
39
 
40
- You can redistribute and/or modify it under the same terms as Ruby.
41
-
42
- Copyright (c) 2006, 2009, 2013 Akinori MUSHA <knu@iDaemons.org>
40
+ Copyright (c) 2006-2017 Akinori MUSHA
41
+
42
+ All rights reserved.
43
+
44
+ Redistribution and use in source and binary forms, with or without
45
+ modification, are permitted provided that the following conditions
46
+ are met:
47
+ 1. Redistributions of source code must retain the above copyright
48
+ notice, this list of conditions and the following disclaimer.
49
+ 2. Redistributions in binary form must reproduce the above copyright
50
+ notice, this list of conditions and the following disclaimer in the
51
+ documentation and/or other materials provided with the distribution.
52
+
53
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
54
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
55
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
56
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
57
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
58
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
59
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
60
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
61
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
62
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
63
+ SUCH DAMAGE.
@@ -0,0 +1,35 @@
1
+ # Digest::Whirlpool - Ruby interface to the Whirlpool message digest algorithm
2
+
3
+ ## Summary
4
+
5
+ Digest::Whirlpool is a Ruby library for calculating message digests
6
+ using the Whirlpool algorithm. The library interface conforms to the
7
+ standard Digest API.
8
+
9
+ More information about Whirlpool:
10
+
11
+ - http://en.wikipedia.org/wiki/Whirlpool_%28algorithm%29
12
+ - http://planeta.terra.com.br/informatica/paulobarreto/WhirlpoolPage.html
13
+
14
+ The C code is based on the sample implementation, as available on the
15
+ mentioned website.
16
+
17
+ ## Requirements
18
+
19
+ - Ruby 2.2 or later
20
+
21
+ ## Usage
22
+
23
+ In Gemfile:
24
+
25
+ gem "digest-whirlpool"
26
+
27
+ In your ruby code:
28
+
29
+ require "digest"
30
+
31
+ p Digest::Whirlpool.hexdigest("") # The module is auto-loaded
32
+
33
+ ## License
34
+
35
+ See the file LICENSE.
@@ -12,19 +12,22 @@ Gem::Specification.new do |spec|
12
12
  The size of a Whirlpool hash value is 512 bits.
13
13
  }
14
14
  spec.summary = %q{A Digest module implementing the Whirlpool hashing algorithm}
15
- spec.homepage = "https://github.com/knu/ruby-digest-extra"
16
- spec.license = "BSD"
15
+ spec.homepage = "https://github.com/knu/ruby-digest-whirlpool"
16
+ spec.license = "BSD-3-Clause"
17
17
 
18
18
  spec.files = `git ls-files`.split($/)
19
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
21
  spec.extensions = ["ext/digest/whirlpool/extconf.rb"]
22
+ spec.required_ruby_version = "~> 2.2"
22
23
 
23
24
  spec.extra_rdoc_files = [
24
25
  "LICENSE",
25
- "README.rdoc"
26
+ "README.md"
26
27
  ]
27
28
 
28
29
  spec.add_development_dependency "bundler", "~> 1.3"
29
30
  spec.add_development_dependency "rake"
31
+ spec.add_development_dependency "rake-compiler"
32
+ spec.add_development_dependency "test-unit"
30
33
  end
@@ -269,7 +269,7 @@ WP_Create() {
269
269
  return wp;
270
270
  }
271
271
 
272
- void
272
+ int
273
273
  WP_Init(WP_Struct *wp) {
274
274
  int i;
275
275
 
@@ -278,7 +278,8 @@ WP_Init(WP_Struct *wp) {
278
278
  wp->buffer[0] = 0; /* it's only necessary to cleanup buffer[bufferPos] */
279
279
  for (i = 0; i < 8; i++) {
280
280
  wp->hash[i] = 0L; /* initial value */
281
- }
281
+ }
282
+ return 1;
282
283
  }
283
284
 
284
285
  void WP_Add(const unsigned char * const source,
@@ -398,7 +399,7 @@ void WP_Add(const unsigned char * const source,
398
399
  structpointer->bufferPos = bufferPos;
399
400
  }
400
401
 
401
- void WP_Finalize(WP_Struct * const structpointer,
402
+ int WP_Finalize(WP_Struct * const structpointer,
402
403
  unsigned char * const result) {
403
404
  int i;
404
405
  u8 *buffer = structpointer->buffer;
@@ -460,6 +461,8 @@ void WP_Finalize(WP_Struct * const structpointer,
460
461
  }
461
462
  structpointer->bufferBits = bufferBits;
462
463
  structpointer->bufferPos = bufferPos;
464
+
465
+ return 1;
463
466
  }
464
467
 
465
468
  void
@@ -43,7 +43,7 @@ WP_Struct *WP_Create();
43
43
  * @param wp A WP_Struct handle, as created by WP_Create()
44
44
  * @require wp != NULL
45
45
  */
46
- void WP_Init(WP_Struct *wp);
46
+ int WP_Init(WP_Struct *wp);
47
47
 
48
48
  /**
49
49
  * Delivers input data to the hashing algorithm.
@@ -67,8 +67,8 @@ void WP_Add(const unsigned char * const source,
67
67
  * result != NULL
68
68
  * result must be able to hold at least WP_DIGEST_SIZE bytes.
69
69
  */
70
- void WP_Finalize(WP_Struct * const wp,
71
- unsigned char * const result);
70
+ int WP_Finalize(WP_Struct * const wp,
71
+ unsigned char * const result);
72
72
 
73
73
  /**
74
74
  * Free a created WP_Struct handle.
@@ -1,5 +1,7 @@
1
+ require 'digest'
2
+
1
3
  module Digest
2
- class Whirlpool
3
- VERSION = "1.0.2"
4
+ class Whirlpool < Digest::Base
5
+ VERSION = "1.0.3"
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,41 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digest-whirlpool
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori MUSHA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-21 00:00:00.000000000 Z
11
+ date: 2017-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake-compiler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: test-unit
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
68
  version: '0'
41
69
  description: |
@@ -48,13 +76,14 @@ extensions:
48
76
  - ext/digest/whirlpool/extconf.rb
49
77
  extra_rdoc_files:
50
78
  - LICENSE
51
- - README.rdoc
79
+ - README.md
52
80
  files:
53
- - .document
54
- - .gitignore
81
+ - ".document"
82
+ - ".gitignore"
83
+ - ".travis.yml"
55
84
  - Gemfile
56
85
  - LICENSE
57
- - README.rdoc
86
+ - README.md
58
87
  - Rakefile
59
88
  - digest-whirlpool.gemspec
60
89
  - ext/digest/whirlpool/depend
@@ -67,9 +96,9 @@ files:
67
96
  - lib/digest/whirlpool.rb
68
97
  - lib/digest/whirlpool/version.rb
69
98
  - test/test_digest-whirlpool.rb
70
- homepage: https://github.com/knu/ruby-digest-extra
99
+ homepage: https://github.com/knu/ruby-digest-whirlpool
71
100
  licenses:
72
- - BSD
101
+ - BSD-3-Clause
73
102
  metadata: {}
74
103
  post_install_message:
75
104
  rdoc_options: []
@@ -77,17 +106,17 @@ require_paths:
77
106
  - lib
78
107
  required_ruby_version: !ruby/object:Gem::Requirement
79
108
  requirements:
80
- - - '>='
109
+ - - "~>"
81
110
  - !ruby/object:Gem::Version
82
- version: '0'
111
+ version: '2.2'
83
112
  required_rubygems_version: !ruby/object:Gem::Requirement
84
113
  requirements:
85
- - - '>='
114
+ - - ">="
86
115
  - !ruby/object:Gem::Version
87
116
  version: '0'
88
117
  requirements: []
89
118
  rubyforge_project:
90
- rubygems_version: 2.0.3
119
+ rubygems_version: 2.6.11
91
120
  signing_key:
92
121
  specification_version: 4
93
122
  summary: A Digest module implementing the Whirlpool hashing algorithm
@@ -1,22 +0,0 @@
1
- = Digest::Whirlpool - Ruby interface to the Whirlpool message digest algorithm
2
-
3
- == Summary
4
-
5
- Digest::Whirlpool is a Ruby library for calculating message digests
6
- using the Whirlpool algorithm. The library interface conforms to the
7
- standard Digest API.
8
-
9
- More information about Whirlpool:
10
- http://en.wikipedia.org/wiki/Whirlpool_%28algorithm%29
11
- http://planeta.terra.com.br/informatica/paulobarreto/WhirlpoolPage.html
12
-
13
- The C code is based on the sample implementation, as available on the
14
- mentioned website.
15
-
16
- == Requirements
17
-
18
- - Ruby 1.8.6 or later
19
-
20
- == License
21
-
22
- See the file LICENSE.