sparq_hmac 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module SparqHmac
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/sparq_hmac.rb CHANGED
@@ -14,4 +14,8 @@ module SparqHMAC
14
14
 
15
15
  OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('sha256'), key, string)
16
16
  end
17
+
18
+ def match_sha_256?(key, provided_hmac, hsh)
19
+ (sign_sha_256(key, hsh) == provided_hmac)
20
+ end
17
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparq_hmac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: