nsisam 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/nsisam/client.rb +5 -5
  3. data/nsisam.gemspec +2 -2
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
data/lib/nsisam/client.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "json"
2
2
  require "net/http"
3
- require "digest/sha1"
3
+ require "digest/sha512"
4
4
  require File.dirname(__FILE__) + '/errors'
5
5
 
6
6
  module NSISam
@@ -24,7 +24,7 @@ module NSISam
24
24
  # @param [String] data the desired data to store
25
25
  # @return [Hash] response with the data key and checksum
26
26
  # * "key" [String] the key to access the stored data
27
- # * "checksum" [String] the sha1 checksum of the stored data
27
+ # * "checksum" [String] the sha512 checksum of the stored data
28
28
  #
29
29
  # @raise [NSISam::Errors::Client::AuthenticationError] when user and password doesn't match
30
30
  #
@@ -80,7 +80,7 @@ module NSISam
80
80
  # @param [String, Hash, Array] data to be stored at the key
81
81
  # @return [Hash] response
82
82
  # * "key" [String] just to value key again
83
- # * "checksum" [String] the new sha1 checksum of the key's data
83
+ # * "checksum" [String] the new sha512 checksum of the key's data
84
84
  #
85
85
  # @raise [NSISam::Errors::Client::KeyNotFoundError] when the key doesn't exists
86
86
  # @raise [NSISam::Errors::Client::AuthenticationError] when user and password doesn't match
@@ -114,8 +114,8 @@ module NSISam
114
114
  end
115
115
 
116
116
  def verify_checksum(data, expected_checksum)
117
- sha1_checksum = Digest::SHA1.hexdigest(data)
118
- raise NSISam::Errors::Client::ChecksumMismatchError unless sha1_checksum == expected_checksum
117
+ sha512_checksum = Digest::SHA512.hexdigest(data)
118
+ raise NSISam::Errors::Client::ChecksumMismatchError unless sha512_checksum == expected_checksum
119
119
  end
120
120
 
121
121
  end
data/nsisam.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "nsisam"
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Douglas Camata"]
12
- s.date = "2012-04-17"
12
+ s.date = "2012-04-27"
13
13
  s.description = "A simple gem to access a SAM node. For more info about SAM\n visit www.github.com/nsi-iff/sam_buildout."
14
14
  s.email = "d.camata@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nsisam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-17 00:00:00.000000000 Z
12
+ date: 2012-04-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -161,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  segments:
163
163
  - 0
164
- hash: 2462525226245869879
164
+ hash: -2280085985363431726
165
165
  required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements: