Skip to content

Commit

Permalink
Merge pull request leishman#2 from leishman/change-base64-method
Browse files Browse the repository at this point in the history
Change Base64.encode64 to Base64.strict_encode64 to prevent '/n' character insertion
  • Loading branch information
leishman committed Feb 27, 2014
2 parents cc4affd + 6206095 commit 9991202
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ PATH
remote: .
specs:
kraken_ruby (0.2.0)
addressable
hashie
httparty

GEM
remote: https://rubygems.org/
specs:
addressable (2.3.5)
diff-lcs (1.2.5)
hashie (2.0.5)
httparty (0.12.0)
Expand All @@ -30,6 +32,8 @@ PLATFORMS

DEPENDENCIES
bundler (~> 1.3)
hashie
httparty
kraken_ruby!
rake
rspec
Binary file added kraken_ruby-0.2.1.gem
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/kraken_ruby/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def generate_message(method, opts, data)
end

def generate_hmac(key, message)
Base64.encode64(OpenSSL::HMAC.digest('sha512', key, message)).split.join # to remove '/n' inserted into signature by HMAc
Base64.strict_encode64(OpenSSL::HMAC.digest('sha512', key, message))
end

def url_path(method)
Expand Down
2 changes: 1 addition & 1 deletion lib/kraken_ruby/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module KrakenRuby
VERSION = "0.2.0"
VERSION = "0.2.1"
end

0 comments on commit 9991202

Please sign in to comment.