Skip to content

Commit

Permalink
update style
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Dec 24, 2016
1 parent 7f76125 commit fa304c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 1 addition & 4 deletions lib/base58_gmp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require 'gmp'

class Base58GMP
VERSION = '1.0.0'
VERSION = '1.0.1'

ALPHABETS = {
bitcoin: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz',
Expand Down Expand Up @@ -81,8 +81,5 @@ class << self
alias encode integer_to_base58
alias decode base58_to_integer
alias md5 md5_base58
#alias :encode, :integer_to_base58
#alias :decode, :base58_to_integer
#alias :md5, :md5_base58
end
end
9 changes: 7 additions & 2 deletions test/test_encode-decode-multi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1590,11 +1590,16 @@ def test_flickr_gmp_transcoding
assert_equal test['b58g'], Base58GMP.encode(test['hex'].to_i(16),'gmp')
assert_equal test['dec'].to_i, Base58GMP.decode(test['b58g'],:gmp).to_i
assert_equal test['hex'] , Base58GMP.decode(test['b58g'],'gmp').to_s(base=16)
end
end

def test_md5
MULTI_EXAMPLES.each do |test|
assert_equal test['b58f'], Base58GMP.md5(test['data'])
assert_equal test['b58f'], Base58GMP.md5_base58(test['data'])
assert_equal test['b58g'], Base58GMP.md5_base58(test['data'],'GMP')
assert_equal test['b58fp'], Base58GMP.md5_base58(test['data'], :flickr, pad: true)
assert_equal test['b58gp'], Base58GMP.md5_base58(test['data'], :gmp, pad: true)
end
end

end
end

0 comments on commit fa304c4

Please sign in to comment.