blake 0.0.3 → 0.0.4

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
  SHA256:
3
- metadata.gz: f5178bee996a4ae66c2f47f649f44035079dbbe625a80b09c5595fa9ffcb7c8a
4
- data.tar.gz: 0d8a24a9400e54aa8857b1d59c5638472818f239d009e381434a7dc6b74802b4
3
+ metadata.gz: ecd78e1e399ea0f3553f71000db6f93f399419a9dad9dcf7b621e01678fcc195
4
+ data.tar.gz: d227eeda89a672d757278ad4d7f0bb8858fe9cb34a8075b56c8afc498d592dd3
5
5
  SHA512:
6
- metadata.gz: 5ef7eb02ff71aa5eb574cf754b14d14d92165f67a10f8619551e59c1bbe4347d50f58d6896e897c02a14a2ac60a10dabd7f090494de23da4ad4d693e9afd97d5
7
- data.tar.gz: f21aa4f2aa1c16a0c28d1185e47c84782965cbe6a615a52f5e398ad8de574da4deefd3b16637b74973ed8259c13ffd0c005a6e9765efa00de4b5f30b323eb1e1
6
+ metadata.gz: 107afa897b1d40618d1860053810e90f924cfa2fb9d63ff29e5859a711905990408f47ac49c326cc5f32c4b0a661e8d717bbd7e2e166643a1fb9f4d6118c651c
7
+ data.tar.gz: 8c5a17dc70a15a1b2110eab7660a0dc70ee6dc0648d39030258d97e4a7efca0ff2e645f5b8762384240a4d3cc6f481a7d238f07c04c5f1f8c7e6dc8003de0376
@@ -97,8 +97,6 @@ module Blake
97
97
 
98
98
  MASK64BITS = 0xFFFFFFFFFFFFFFFF
99
99
 
100
- # private_class_method :new
101
-
102
100
  def initialize(output_size = 512, salt = nil)
103
101
  self.output_size = output_size
104
102
  self.salt = salt
@@ -223,6 +221,10 @@ module Blake
223
221
  raise TypeError, "Expected #{Integer}, got #{value.class}"
224
222
  end
225
223
 
224
+ unless [224, 256, 384, 512].include? value
225
+ raise TypeError, 'unknown output size'
226
+ end
227
+
226
228
  @output_size = value
227
229
  end
228
230
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Blake
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Cavanagh (danielcavanagh)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-08 00:00:00.000000000 Z
11
+ date: 2020-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler