digest-tiger 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 199fa1a7d0826d9ff8718e19ade7c714a7a4a30a
4
- data.tar.gz: 9d1814e2b128fc989fbc7f02a05079d06d11e66d
3
+ metadata.gz: 339e1d21365fdc898313080cf1b4315304b9fafe
4
+ data.tar.gz: 166d7154348c8402eacdc2a86419f36577dac4f6
5
5
  SHA512:
6
- metadata.gz: 834668678052f4adf67f7a8e081e209beb093d0b6fc7bfd7a77d9e81ddcbb20daae4c7c2efbe770e710f42db942c3de87e4115cb52170c5e8216de9deaa35d78
7
- data.tar.gz: 703b988e219a250526a36e3b0346625dc271c4402b2b9fe1068f6f4ccaf034f75648d50c6ed34ae5e602c146765c7ccb7ea00a2565f92db2de6025ef08dd0a68
6
+ metadata.gz: fb536496daf2b671d2a5534dd787eba3f8222fa1cda45ca656c0412fc7a4bc3f5d78972705266d2b1b01735479fa57a73a60d4130b33d6af325566bc3936ebc9
7
+ data.tar.gz: 63dfafa317d719078096345151696c3e086eba805bb11b31b5808556d861b5220dc421cd4dd6704406f6c838a3c384ad6b8a42bb43a44005e65c64a44e1b0cdd
@@ -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
@@ -2,7 +2,8 @@ tiger.c:
2
2
  tiger.h:
3
3
 
4
4
  These are based on the reference implementation found on the
5
- official website mentioned above, which website says:
5
+ official website (http://www.cs.technion.ac.il/~biham/Reports/Tiger/),
6
+ which reads:
6
7
 
7
8
  Tiger has no usage restrictions nor patents. It can be used
8
9
  freely, with the reference implementation, with other
@@ -13,6 +14,27 @@ tiger.h:
13
14
 
14
15
  For the rest:
15
16
 
16
- You can redistribute and/or modify it under the same terms as Ruby.
17
+ Copyright (c) 2006-2017 Akinori MUSHA
17
18
 
18
- Copyright (c) 2006, 2009, 2013 Akinori MUSHA <knu@iDaemons.org>
19
+ All rights reserved.
20
+
21
+ Redistribution and use in source and binary forms, with or without
22
+ modification, are permitted provided that the following conditions
23
+ are met:
24
+ 1. Redistributions of source code must retain the above copyright
25
+ notice, this list of conditions and the following disclaimer.
26
+ 2. Redistributions in binary form must reproduce the above copyright
27
+ notice, this list of conditions and the following disclaimer in the
28
+ documentation and/or other materials provided with the distribution.
29
+
30
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
31
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
34
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40
+ SUCH DAMAGE.
@@ -0,0 +1,32 @@
1
+ # Digest::Tiger - Ruby interface to the Tiger message digest algorithm
2
+
3
+ ## Summary
4
+
5
+ Digest::Tiger is a Ruby library for calculating message digests using
6
+ the Tiger algorithm. The library interface conforms to the standard
7
+ Digest API.
8
+
9
+ More information about Tiger:
10
+
11
+ - http://en.wikipedia.org/wiki/Tiger_%28hash%29
12
+ - http://www.cs.technion.ac.il/~biham/Reports/Tiger/
13
+
14
+ ## Requirements
15
+
16
+ - Ruby 2.2 or later
17
+
18
+ ## Usage
19
+
20
+ In Gemfile:
21
+
22
+ gem "digest-tiger"
23
+
24
+ In your ruby code:
25
+
26
+ require "digest"
27
+
28
+ p Digest::Tiger.hexdigest("") # The module is auto-loaded
29
+
30
+ ## License
31
+
32
+ See the file LICENSE.
@@ -12,19 +12,22 @@ Gem::Specification.new do |spec|
12
12
  The size of a Tiger hash value is 192 bits.
13
13
  }
14
14
  spec.summary = %q{A Digest module implementing the Tiger 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-tiger"
16
+ spec.license = "BSD-2-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/tiger/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
@@ -650,7 +650,7 @@ void tiger_compress(uint64_t *str, uint64_t state[3])
650
650
  tiger_compress_macro(((uint64_t*)str), ((uint64_t*)state))
651
651
  #endif
652
652
 
653
- void
653
+ int
654
654
  tiger_init(tiger_state_t *ctx)
655
655
  {
656
656
  ctx->state[0] = 0x0123456789ABCDEFLL;
@@ -658,6 +658,8 @@ tiger_init(tiger_state_t *ctx)
658
658
  ctx->state[2] = 0xF096A5B4C3B2E187LL;
659
659
  ctx->len = 0;
660
660
  ctx->remlen = 0;
661
+
662
+ return 1;
661
663
  }
662
664
 
663
665
  void
@@ -689,7 +691,7 @@ tiger_update(tiger_state_t *ctx, uint8_t *str, uint32_t length)
689
691
  }
690
692
  }
691
693
 
692
- void
694
+ int
693
695
  tiger_final(tiger_state_t *ctx, uint8_t *result)
694
696
  {
695
697
  uint32_t i, j;
@@ -728,4 +730,6 @@ tiger_final(tiger_state_t *ctx, uint8_t *result)
728
730
  tiger_compress(((uint64_t*)temp), ctx->state);
729
731
 
730
732
  memcpy(result, ctx->state, sizeof(ctx->state));
733
+
734
+ return 1;
731
735
  }
@@ -47,6 +47,6 @@ typedef struct {
47
47
  #define TIGER_DIGEST_LENGTH ( 3 * sizeof(uint64_t))
48
48
  #define TIGER_BLOCK_LENGTH (64 * sizeof(uint8_t))
49
49
 
50
- void tiger_init(tiger_state_t *ctx);
50
+ int tiger_init(tiger_state_t *ctx);
51
51
  void tiger_update(tiger_state_t *ctx, uint8_t *str, uint32_t length);
52
- void tiger_final(tiger_state_t *ctx, uint8_t *result);
52
+ int tiger_final(tiger_state_t *ctx, uint8_t *result);
@@ -1,5 +1,7 @@
1
+ require 'digest'
2
+
1
3
  module Digest
2
- class Tiger
3
- VERSION = "1.0.2"
4
+ class Tiger < 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-tiger
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/tiger/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-tiger.gemspec
60
89
  - ext/digest/tiger/depend
@@ -65,9 +94,9 @@ files:
65
94
  - lib/digest/tiger.rb
66
95
  - lib/digest/tiger/version.rb
67
96
  - test/test_digest-tiger.rb
68
- homepage: https://github.com/knu/ruby-digest-extra
97
+ homepage: https://github.com/knu/ruby-digest-tiger
69
98
  licenses:
70
- - BSD
99
+ - BSD-2-Clause
71
100
  metadata: {}
72
101
  post_install_message:
73
102
  rdoc_options: []
@@ -75,17 +104,17 @@ require_paths:
75
104
  - lib
76
105
  required_ruby_version: !ruby/object:Gem::Requirement
77
106
  requirements:
78
- - - '>='
107
+ - - "~>"
79
108
  - !ruby/object:Gem::Version
80
- version: '0'
109
+ version: '2.2'
81
110
  required_rubygems_version: !ruby/object:Gem::Requirement
82
111
  requirements:
83
- - - '>='
112
+ - - ">="
84
113
  - !ruby/object:Gem::Version
85
114
  version: '0'
86
115
  requirements: []
87
116
  rubyforge_project:
88
- rubygems_version: 2.0.3
117
+ rubygems_version: 2.6.11
89
118
  signing_key:
90
119
  specification_version: 4
91
120
  summary: A Digest module implementing the Tiger hashing algorithm
@@ -1,26 +0,0 @@
1
- = Digest::Tiger - Ruby interface to the Tiger message digest algorithm
2
-
3
- == Summary
4
-
5
- Digest::Tiger is a Ruby library for calculating message digests using
6
- the Tiger algorithm. The library interface conforms to the standard
7
- Digest API.
8
-
9
- More information about Tiger:
10
- http://en.wikipedia.org/wiki/Tiger_%28hash%29
11
- http://www.cs.technion.ac.il/~biham/Reports/Tiger/
12
-
13
- == Requirements
14
-
15
- - Ruby 1.8.6 or later
16
-
17
- == Usage
18
-
19
- require 'digest'
20
- require 'rubygems' # If installed via gem
21
-
22
- p Digest::Tiger.hexdigest("") # The module is auto-loaded
23
-
24
- == License
25
-
26
- See the file LICENSE.