base58_gmp 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +40 -0
- data/Rakefile +22 -0
- data/VERSION +1 -0
- data/base58_gmp.gemspec +27 -0
- data/lib/base58_gmp.rb +29 -0
- data/test/test_base58_gmp.rb +513 -0
- data/test/test_md5_base58.rb +190 -0
- metadata +75 -0
data/CHANGELOG
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 John Wang
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
= Base58GMP
|
2
|
+
|
3
|
+
High speed Base58 encoding using GMP with MD5 support
|
4
|
+
|
5
|
+
=== Install
|
6
|
+
|
7
|
+
Base58GMP is hosted by http://rubygems.org. Please make sure you have added them to your gem sources.
|
8
|
+
|
9
|
+
$ sudo gem install base58_gmp
|
10
|
+
|
11
|
+
== Usage
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'base58_gmp'
|
15
|
+
|
16
|
+
# Int to Base58
|
17
|
+
Base58GMP.encode(12345) # => 4ER
|
18
|
+
|
19
|
+
# MD5 Base58 Digest
|
20
|
+
Base58GMP.md5('foo@bar.com') # => w6fdCRXnUXyz7EtDn5TgN9
|
21
|
+
|
22
|
+
== Problems, Comments, Suggestions?
|
23
|
+
|
24
|
+
All of the above are most welcome. mailto:john@johnwang.com
|
25
|
+
|
26
|
+
== Credits
|
27
|
+
|
28
|
+
John Wang - http://johnwang.com
|
29
|
+
|
30
|
+
Test examples courtesy Fraser Speirs' Base58Encoder Objective-C class, http://gist.github.com/101674.
|
31
|
+
|
32
|
+
== License
|
33
|
+
|
34
|
+
Base58GMP is available under the MIT license.
|
35
|
+
|
36
|
+
:include: MIT-LICENSE
|
37
|
+
|
38
|
+
== Warranty
|
39
|
+
|
40
|
+
This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/rdoctask'
|
4
|
+
|
5
|
+
desc 'Default: run unit tests.'
|
6
|
+
task :default => :test
|
7
|
+
|
8
|
+
desc 'Test the Base58GMP library.'
|
9
|
+
Rake::TestTask.new do |t|
|
10
|
+
t.libs << 'lib'
|
11
|
+
t.pattern = 'test/**/test_*.rb'
|
12
|
+
t.verbose = false
|
13
|
+
end
|
14
|
+
|
15
|
+
desc 'Generate RDoc documentation.'
|
16
|
+
Rake::RDocTask.new do |rdoc|
|
17
|
+
rdoc.rdoc_dir = 'rdoc'
|
18
|
+
rdoc.title = 'base58_gmp'
|
19
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
20
|
+
rdoc.rdoc_files.include('README.rdoc')
|
21
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
22
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/base58_gmp.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'base58_gmp'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.date = '2011-11-06'
|
5
|
+
s.summary = 'High speed Base58 encoding using GMP with MD5 support'
|
6
|
+
s.description = 'Base58 encoding using The GNU Multiple Precision Arithmetic Library (GMP)'
|
7
|
+
s.authors = ['John Wang']
|
8
|
+
s.email = 'john@johnwang.com'
|
9
|
+
s.files = ['lib/base58_gmp.rb']
|
10
|
+
s.homepage =
|
11
|
+
'http://rubygems.org/gems/base58_gmp'
|
12
|
+
s.extra_rdoc_files = [
|
13
|
+
'README.rdoc'
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
'CHANGELOG',
|
17
|
+
'MIT-LICENSE',
|
18
|
+
'README.rdoc',
|
19
|
+
'Rakefile',
|
20
|
+
'VERSION',
|
21
|
+
'base58_gmp.gemspec',
|
22
|
+
'lib/base58_gmp.rb',
|
23
|
+
'test/test_base58_gmp.rb',
|
24
|
+
'test/test_md5_base58.rb'
|
25
|
+
]
|
26
|
+
|
27
|
+
end
|
data/lib/base58_gmp.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'digest/md5'
|
3
|
+
require 'gmp'
|
4
|
+
|
5
|
+
class Base58GMP
|
6
|
+
|
7
|
+
ALPHABET_GMP = '0-89A-JK-XYZa-fg-kl-v'
|
8
|
+
ALPHABET_FLICKR = '1-9ab-km-zABC-HJ-NP-Z'
|
9
|
+
|
10
|
+
def self.number_to_base58( number )
|
11
|
+
base58 = GMP::Z( number ).to_s( base = 58 )
|
12
|
+
base58 = self.gmp_to_flickr( base58 )
|
13
|
+
base58
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.gmp_to_flickr( base58_as_gmp )
|
17
|
+
base58 = base58_as_gmp.tr( ALPHABET_GMP, ALPHABET_FLICKR )
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.md5_base58( data )
|
21
|
+
self.number_to_base58( Digest::MD5.hexdigest( data ).hex )
|
22
|
+
end
|
23
|
+
|
24
|
+
class << self
|
25
|
+
alias_method :encode, :number_to_base58
|
26
|
+
alias_method :md5, :md5_base58
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,513 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'base58_gmp'
|
3
|
+
|
4
|
+
class TestBase58GMP < Test::Unit::TestCase
|
5
|
+
|
6
|
+
INTEGER_EXAMPLES = { "6hKMCS" => 3471391110,
|
7
|
+
"6hDrmR" => 3470152229,
|
8
|
+
"6hHHZB" => 3470988633,
|
9
|
+
"6hHKum" => 3470993664,
|
10
|
+
"6hLgFW" => 3471485480,
|
11
|
+
"6hBRKR" => 3469844075,
|
12
|
+
"6hGRTd" => 3470820062,
|
13
|
+
"6hCuie" => 3469966999,
|
14
|
+
"6hJuXN" => 3471139908,
|
15
|
+
"6hJsyS" => 3471131850,
|
16
|
+
"6hFWFb" => 3470641072,
|
17
|
+
"6hENdZ" => 3470417529,
|
18
|
+
"6hEJqg" => 3470404727,
|
19
|
+
"6hGNaq" => 3470807546,
|
20
|
+
"6hDRoZ" => 3470233089,
|
21
|
+
"6hKkP9" => 3471304242,
|
22
|
+
"6hHVZ3" => 3471028968,
|
23
|
+
"6hNcfE" => 3471860782,
|
24
|
+
"6hJBqs" => 3471161638,
|
25
|
+
"6hCPyc" => 3470031783,
|
26
|
+
"6hJNrC" => 3471198710,
|
27
|
+
"6hKmkd" => 3471305986,
|
28
|
+
"6hFUYs" => 3470635346,
|
29
|
+
"6hK6UC" => 3471257464,
|
30
|
+
"6hBmiv" => 3469744991,
|
31
|
+
"6hKex1" => 3471283122,
|
32
|
+
"6hFHQj" => 3470597870,
|
33
|
+
"6hCA2n" => 3469986263,
|
34
|
+
"6hBTgt" => 3469849157,
|
35
|
+
"6hHEss" => 3470976734,
|
36
|
+
"6hLows" => 3471508478,
|
37
|
+
"6hD95z" => 3470094097,
|
38
|
+
"6hKjcq" => 3471298806,
|
39
|
+
"6hGEbd" => 3470780680,
|
40
|
+
"6hKSNS" => 3471408510,
|
41
|
+
"6hG8hv" => 3470676761,
|
42
|
+
"6hEmj6" => 3470330361,
|
43
|
+
"6hGjpn" => 3470714163,
|
44
|
+
"6hEsUr" => 3470352537,
|
45
|
+
"6hJEhy" => 3471171272,
|
46
|
+
"6hKBHn" => 3471357731,
|
47
|
+
"6hG3gi" => 3470659871,
|
48
|
+
"6hFJTT" => 3470601441,
|
49
|
+
"6hLZDs" => 3471626624,
|
50
|
+
"6hGdL7" => 3470695182,
|
51
|
+
"6hBpi4" => 3469755057,
|
52
|
+
"6hEuFV" => 3470358539,
|
53
|
+
"6hGVw1" => 3470832288,
|
54
|
+
"6hLdm1" => 3471474232,
|
55
|
+
"6hFcCK" => 3470496279,
|
56
|
+
"6hDZmR" => 3470259877,
|
57
|
+
"6hG8iX" => 3470676845,
|
58
|
+
"6hFZZL" => 3470652242,
|
59
|
+
"6hJ79u" => 3471063156,
|
60
|
+
"6hMsrS" => 3471716780,
|
61
|
+
"6hGH3G" => 3470790336,
|
62
|
+
"6hKqD3" => 3471320476,
|
63
|
+
"6hKxEY" => 3471344136,
|
64
|
+
"6hHVF1" => 3471027922,
|
65
|
+
"6hKDSQ" => 3471365008,
|
66
|
+
"6hKwHs" => 3471340916,
|
67
|
+
"6hH4s6" => 3470858973,
|
68
|
+
"6hGmKB" => 3470722065,
|
69
|
+
"6hEzdi" => 3470373757,
|
70
|
+
"6hJQwJ" => 3471205734,
|
71
|
+
"6hHd6a" => 3470888035,
|
72
|
+
"6hH1j3" => 3470848414,
|
73
|
+
"6hNP1u" => 3471981064,
|
74
|
+
"6hFWge" => 3470639683,
|
75
|
+
"6hFpmP" => 3470535723,
|
76
|
+
"6hCgQZ" => 3469925109,
|
77
|
+
"6hFJSm" => 3470601352,
|
78
|
+
"6hEd9v" => 3470302893,
|
79
|
+
"6hDwuF" => 3470169503,
|
80
|
+
"6hCVSX" => 3470053055,
|
81
|
+
"6hCUgr" => 3470047631,
|
82
|
+
"6hEsqR" => 3470350937,
|
83
|
+
"6hBmKg" => 3469746485,
|
84
|
+
"6hDvUx" => 3470167523,
|
85
|
+
"6hJUi7" => 3471218400,
|
86
|
+
"6hF39e" => 3470464349,
|
87
|
+
"6hH43K" => 3470857619,
|
88
|
+
"6hGSC5" => 3470822548,
|
89
|
+
"6hFz1s" => 3470568182,
|
90
|
+
"6hFaKZ" => 3470489971,
|
91
|
+
"6hD65K" => 3470084015,
|
92
|
+
"6hBAVk" => 3469794165,
|
93
|
+
"6hLkWA" => 3471499786,
|
94
|
+
"6hHi7q" => 3470904928,
|
95
|
+
"6hHdDF" => 3470889921,
|
96
|
+
"6hHcCo" => 3470886482,
|
97
|
+
"6hGQQf" => 3470816526,
|
98
|
+
"6hLAfo" => 3471547914,
|
99
|
+
"6hBDEV" => 3469803421,
|
100
|
+
"6hL4BE" => 3471444864,
|
101
|
+
"6hL2TT" => 3471439077,
|
102
|
+
"6hKcxb" => 3471276404,
|
103
|
+
"6hD1vg" => 3470068617,
|
104
|
+
"6hLtTT" => 3471526541,
|
105
|
+
"6hHXtw" => 3471033984,
|
106
|
+
"6hHCQj" => 3470971274,
|
107
|
+
"6hFrXx" => 3470544465,
|
108
|
+
"6hMVkJ" => 3471807252,
|
109
|
+
"6hDv6V" => 3470164819,
|
110
|
+
"6hD1gR" => 3470067839,
|
111
|
+
"6hShWW" => 3472660386,
|
112
|
+
"6hK4tb" => 3471249260,
|
113
|
+
"6hLzrQ" => 3471545214,
|
114
|
+
"6hBTAe" => 3469850245,
|
115
|
+
"6hLABq" => 3471549134,
|
116
|
+
"6hGbN7" => 3470688570,
|
117
|
+
"6hFtro" => 3470549444,
|
118
|
+
"6hRRAQ" => 3472575120,
|
119
|
+
"6hFViL" => 3470636466,
|
120
|
+
"6hFkLP" => 3470523659,
|
121
|
+
"6hNAKc" => 3471939809,
|
122
|
+
"6hLLNE" => 3471583426,
|
123
|
+
"6hJstp" => 3471131533,
|
124
|
+
"6hHxv3" => 3470953336,
|
125
|
+
"6hLToQ" => 3471605592,
|
126
|
+
"6hJ74F" => 3471062877,
|
127
|
+
"6hGjCA" => 3470714930,
|
128
|
+
"6hCQoD" => 3470034593,
|
129
|
+
"6hCqxX" => 3469954397,
|
130
|
+
"6hCbg8" => 3469906325,
|
131
|
+
"6hJwGw" => 3471145750,
|
132
|
+
"6hP2Tt" => 3472024389,
|
133
|
+
"6hHDuy" => 3470973492,
|
134
|
+
"6hGRpq" => 3470818450,
|
135
|
+
"6hDx8F" => 3470171649,
|
136
|
+
"6hLhxU" => 3471488378,
|
137
|
+
"6hFrkd" => 3470542358,
|
138
|
+
"6hPc3D" => 3472055197,
|
139
|
+
"6hJV29" => 3471220838,
|
140
|
+
"6hCc3c" => 3469908939,
|
141
|
+
"6hLycA" => 3471541024,
|
142
|
+
"6hLd75" => 3471473424,
|
143
|
+
"6hKJ1m" => 3471378900,
|
144
|
+
"6hHgEG" => 3470900072,
|
145
|
+
"6hFNfm" => 3470612720,
|
146
|
+
"6hFsaF" => 3470545169,
|
147
|
+
"6hERqV" => 3470428313,
|
148
|
+
"6hEnYK" => 3470335967,
|
149
|
+
"6hDGeT" => 3470202285,
|
150
|
+
"6hFDZo" => 3470584940,
|
151
|
+
"6hMvPE" => 3471728136,
|
152
|
+
"6hKTro" => 3471410628,
|
153
|
+
"6hKfXG" => 3471287918,
|
154
|
+
"6hKeuU" => 3471283000,
|
155
|
+
"6hHFYj" => 3470981830,
|
156
|
+
"6hHDzj" => 3470973768,
|
157
|
+
"6hCozt" => 3469947757,
|
158
|
+
"6hKB8D" => 3471355775,
|
159
|
+
"6hCtrc" => 3469964097,
|
160
|
+
"6hDXcx" => 3470252609,
|
161
|
+
"6hCxSR" => 3469979041,
|
162
|
+
"6hC1Vk" => 3469874901,
|
163
|
+
"6hKmaS" => 3471305444,
|
164
|
+
"6hK9fn" => 3471265337,
|
165
|
+
"6hFDH6" => 3470583995,
|
166
|
+
"6hEB7c" => 3470380131,
|
167
|
+
"6hC1E2" => 3469874013,
|
168
|
+
"6hBZnx" => 3469869693,
|
169
|
+
"6hBXNz" => 3469864417,
|
170
|
+
"6hQKjm" => 3472358868,
|
171
|
+
"6hHn4j" => 3470918204,
|
172
|
+
"6hHiQ2" => 3470907341,
|
173
|
+
"6hHhHb" => 3470903580,
|
174
|
+
"6hGnBc" => 3470724941,
|
175
|
+
"6hG6Ht" => 3470671481,
|
176
|
+
"6hDvh6" => 3470165409,
|
177
|
+
"6hCGtp" => 3470007957,
|
178
|
+
"6hCnzi" => 3469944383,
|
179
|
+
"6hMxEY" => 3471734360,
|
180
|
+
"6hG9sL" => 3470680720,
|
181
|
+
"6hCarn" => 3469903555,
|
182
|
+
"6hLsdE" => 3471520902,
|
183
|
+
"6hKnDa" => 3471310391,
|
184
|
+
"6hKn2L" => 3471308338,
|
185
|
+
"6hGpfH" => 3470730481,
|
186
|
+
"6hRkJS" => 3472474666,
|
187
|
+
"6hFEV3" => 3470588052,
|
188
|
+
"6hE7VV" => 3470285343,
|
189
|
+
"6hSSAq" => 3472773572,
|
190
|
+
"6hNTtQ" => 3471996106,
|
191
|
+
"6hMAuK" => 3471743859,
|
192
|
+
"6hJ95H" => 3471069665,
|
193
|
+
"6hHZ39" => 3471039240,
|
194
|
+
"6hByNi" => 3469787029,
|
195
|
+
"6hLLnb" => 3471581948,
|
196
|
+
"6hHYoQ" => 3471037076,
|
197
|
+
"6hHCLm" => 3470971044,
|
198
|
+
"6hFHkC" => 3470596206,
|
199
|
+
"6hDKq4" => 3470212967,
|
200
|
+
"6hRapC" => 3472439910,
|
201
|
+
"6hKJBs" => 3471380936,
|
202
|
+
"6hHids" => 3470905278,
|
203
|
+
"6hEJ8R" => 3470403775,
|
204
|
+
"6hMY3L" => 3471816360,
|
205
|
+
"6hFRAC" => 3470623988,
|
206
|
+
"6hEP9c" => 3470420615,
|
207
|
+
"6hEqVR" => 3470345891,
|
208
|
+
"6hHGBX" => 3470984013,
|
209
|
+
"6hEzFB" => 3470375341,
|
210
|
+
"6hDnRp" => 3470140429,
|
211
|
+
"6hDdQH" => 3470110113,
|
212
|
+
"6hCK7B" => 3470016843,
|
213
|
+
"6hCxvH" => 3469977815,
|
214
|
+
"6hC4v4" => 3469883585,
|
215
|
+
"6hC15g" => 3469872055,
|
216
|
+
"6hGHRA" => 3470793056,
|
217
|
+
"6hGCGL" => 3470775724,
|
218
|
+
"6hGbuW" => 3470687574,
|
219
|
+
"6hT7FY" => 3472820990,
|
220
|
+
"6hMFHs" => 3471761416,
|
221
|
+
"6hJybH" => 3471150749,
|
222
|
+
"6hGEFs" => 3470782376,
|
223
|
+
"6hCBnX" => 3469990821,
|
224
|
+
"6hNJZt" => 3471967549,
|
225
|
+
"6hMxUV" => 3471735169,
|
226
|
+
"6hLoGG" => 3471509072,
|
227
|
+
"6hJdy5" => 3471084708,
|
228
|
+
"6hGnwp" => 3470724663,
|
229
|
+
"6hGkhZ" => 3470717157,
|
230
|
+
"6hG7yd" => 3470674308,
|
231
|
+
"6hDAqF" => 3470182727,
|
232
|
+
"6hPQVJ" => 3472182628,
|
233
|
+
"6hHyqy" => 3470956440,
|
234
|
+
"6hFG6k" => 3470592013,
|
235
|
+
"6hTavC" => 3472830482,
|
236
|
+
"6hJjzU" => 3471104998,
|
237
|
+
"6hFE7r" => 3470585349,
|
238
|
+
"6hNQU7" => 3471987422,
|
239
|
+
"6hJYSj" => 3471233782,
|
240
|
+
"6hFVRB" => 3470638313,
|
241
|
+
"6hEeQt" => 3470308575,
|
242
|
+
"6hBmnK" => 3469745237,
|
243
|
+
"6hP9VU" => 3472048078,
|
244
|
+
"6hJeDp" => 3471088381,
|
245
|
+
"6hHV4d" => 3471025846,
|
246
|
+
"6hFXmS" => 3470643374,
|
247
|
+
"6hBgEn" => 3469729381,
|
248
|
+
"6hNDjB" => 3471948475,
|
249
|
+
"6hKEkd" => 3471366538,
|
250
|
+
"6hJDq6" => 3471168345,
|
251
|
+
"6hHbCG" => 3470883136,
|
252
|
+
"6hCgN2" => 3469924937,
|
253
|
+
"6hQa3S" => 3472243594,
|
254
|
+
"6hLphv" => 3471511033,
|
255
|
+
"6hHoqd" => 3470922780,
|
256
|
+
"6hGT2W" => 3470823932,
|
257
|
+
"6hEd6V" => 3470302743,
|
258
|
+
"6hNac3" => 3471853844,
|
259
|
+
"6hHzYe" => 3470961641,
|
260
|
+
"6hRDAC" => 3472534740,
|
261
|
+
"6hJ2bu" => 3471046452,
|
262
|
+
"6hGRPN" => 3470819864,
|
263
|
+
"6hFS6P" => 3470625681,
|
264
|
+
"6hG8Yn" => 3470679073,
|
265
|
+
"6hFSGB" => 3470627699,
|
266
|
+
"6hFQhL" => 3470619588,
|
267
|
+
"6hF4VT" => 3470470361,
|
268
|
+
"6hE7vD" => 3470283935,
|
269
|
+
"6hBeKa" => 3469722931,
|
270
|
+
"6hPLs1" => 3472167564,
|
271
|
+
"6hHcKm" => 3470886886,
|
272
|
+
"6hG9KW" => 3470681716,
|
273
|
+
"6hE8E4" => 3470287787,
|
274
|
+
"6hNp1U" => 3471900352,
|
275
|
+
"6hJ29T" => 3471046359,
|
276
|
+
"6hHPLb" => 3471008038,
|
277
|
+
"6hGWGq" => 3470836256,
|
278
|
+
"6hEipV" => 3470320607,
|
279
|
+
"6hMB8U" => 3471746014,
|
280
|
+
"6hKWyr" => 3471421129,
|
281
|
+
"6hKLxb" => 3471387416,
|
282
|
+
"6hJstE" => 3471131548,
|
283
|
+
"6hHk3k" => 3470911419,
|
284
|
+
"6hPSdE" => 3472186974,
|
285
|
+
"6hPfEY" => 3472067396,
|
286
|
+
"6hGVSS" => 3470833498,
|
287
|
+
"6hFVX4" => 3470638629,
|
288
|
+
"6hFQRa" => 3470621467,
|
289
|
+
"6hCsKK" => 3469961809,
|
290
|
+
"6hJbdY" => 3471076872,
|
291
|
+
"6hE2ok" => 3470266691,
|
292
|
+
"6hCrc8" => 3469956553,
|
293
|
+
"6hRgwS" => 3472460514,
|
294
|
+
"6hPhLY" => 3472074472,
|
295
|
+
"6hLTK1" => 3471606762,
|
296
|
+
"6hHh5u" => 3470901452,
|
297
|
+
"6hDiBB" => 3470126173,
|
298
|
+
"6hD678" => 3470084095,
|
299
|
+
"6hKMXC" => 3471392198,
|
300
|
+
"6hBohi" => 3469751649,
|
301
|
+
"6hJXRV" => 3471230395,
|
302
|
+
"6hFzad" => 3470568690,
|
303
|
+
"6hCCbH" => 3469993533,
|
304
|
+
"6hLpoA" => 3471511386,
|
305
|
+
"6hKZQN" => 3471432170,
|
306
|
+
"6hG3Ax" => 3470660987,
|
307
|
+
"6hT7kf" => 3472819788,
|
308
|
+
"6hKrzq" => 3471323630,
|
309
|
+
"6hHMHM" => 3471001171,
|
310
|
+
"6hHL9q" => 3470995872,
|
311
|
+
"6hBUkR" => 3469852775,
|
312
|
+
"6hRRLf" => 3472575666,
|
313
|
+
"6hJFUg" => 3471176707,
|
314
|
+
"6hBML2" => 3469830629,
|
315
|
+
"6hS9eE" => 3472631080,
|
316
|
+
"6hPD3o" => 3472142646,
|
317
|
+
"6hKWhL" => 3471420220,
|
318
|
+
"6hJMpr" => 3471195219,
|
319
|
+
"6hHzVA" => 3470961488,
|
320
|
+
"6hGvu9" => 3470751444,
|
321
|
+
"6hGkTu" => 3470719158,
|
322
|
+
"6hF7bv" => 3470477937,
|
323
|
+
"6hDzQp" => 3470180739,
|
324
|
+
"6hQ2Mo" => 3472219148,
|
325
|
+
"6hM7Tn" => 3471650979,
|
326
|
+
"6hJWDp" => 3471226305,
|
327
|
+
"6hJpX5" => 3471123046,
|
328
|
+
"6hNLTn" => 3471973923,
|
329
|
+
"6hGuRu" => 3470749318,
|
330
|
+
"6hG1CM" => 3470654389,
|
331
|
+
"6hEMDx" => 3470415589,
|
332
|
+
"6hCYpx" => 3470061557,
|
333
|
+
"6hCSTr" => 3470042991,
|
334
|
+
"6hBnJr" => 3469749801,
|
335
|
+
"6hRZSh" => 3472602928,
|
336
|
+
"6hRtVW" => 3472502220,
|
337
|
+
"6hDzc2" => 3470178571,
|
338
|
+
"6hCMan" => 3470023731,
|
339
|
+
"6hRfUj" => 3472458394,
|
340
|
+
"6hLdME" => 3471475720,
|
341
|
+
"6hE69P" => 3470279363,
|
342
|
+
"6hDgaa" => 3470117911,
|
343
|
+
"6hDeKg" => 3470113161,
|
344
|
+
"6hKSis" => 3471406804,
|
345
|
+
"6hKwYj" => 3471341778,
|
346
|
+
"6hJ4Ro" => 3471055436,
|
347
|
+
"6hHTug" => 3471020571,
|
348
|
+
"6hHSH2" => 3471017947,
|
349
|
+
"6hHCE6" => 3470970681,
|
350
|
+
"6hG5R5" => 3470668558,
|
351
|
+
"6hFaBX" => 3470489505,
|
352
|
+
"6hL13o" => 3471432842,
|
353
|
+
"6hJtQr" => 3471136117,
|
354
|
+
"6hHpg3" => 3470925612,
|
355
|
+
"6hGinv" => 3470710691,
|
356
|
+
"6hFQXR" => 3470621855,
|
357
|
+
"6hCKN6" => 3470019133,
|
358
|
+
"6hJme9" => 3471110522,
|
359
|
+
"6hGUY8" => 3470830439,
|
360
|
+
"6hEDPM" => 3470389271,
|
361
|
+
"6hBg1c" => 3469727167,
|
362
|
+
"6hNyoj" => 3471931870,
|
363
|
+
"6hNdQu" => 3471866108,
|
364
|
+
"6hMNAK" => 3471784575,
|
365
|
+
"6hHkvV" => 3470913019,
|
366
|
+
"6hDHLi" => 3470207413,
|
367
|
+
"6hCwUk" => 3469975763,
|
368
|
+
"6hCd2a" => 3469912243,
|
369
|
+
"6hPeRd" => 3472064626,
|
370
|
+
"6hP4SL" => 3472031076,
|
371
|
+
"6hJQFC" => 3471206250,
|
372
|
+
"6hJLVJ" => 3471193612,
|
373
|
+
"6hJAJT" => 3471159343,
|
374
|
+
"6hJ8Mi" => 3471068655,
|
375
|
+
"6hJ6o5" => 3471060580,
|
376
|
+
"6hH667" => 3470864484,
|
377
|
+
"6hH5RU" => 3470863718,
|
378
|
+
"6hC2jx" => 3469876247,
|
379
|
+
"6hPm75" => 3472085672,
|
380
|
+
"6hN8ud" => 3471848112,
|
381
|
+
"6hLD4g" => 3471557361,
|
382
|
+
"6hGAr2" => 3470768083,
|
383
|
+
"6hFVQH" => 3470638261,
|
384
|
+
"6hDxtV" => 3470172823,
|
385
|
+
"6hPNwj" => 3472174542,
|
386
|
+
"6hKTB7" => 3471411192,
|
387
|
+
"6hJdfQ" => 3471083708,
|
388
|
+
"6hRvdq" => 3472506540,
|
389
|
+
"6hNpN9" => 3471902976,
|
390
|
+
"6hMd75" => 3471668536,
|
391
|
+
"6hLkks" => 3471497748,
|
392
|
+
"6hHkYn" => 3470914553,
|
393
|
+
"6hGZgY" => 3470844930,
|
394
|
+
"6hGorv" => 3470727743,
|
395
|
+
"6hG941" => 3470679342,
|
396
|
+
"6hC6xK" => 3469890469,
|
397
|
+
"6hTA5N" => 3472913142,
|
398
|
+
"6hNzGE" => 3471936298,
|
399
|
+
"6hN3F1" => 3471831918,
|
400
|
+
"6hLdgN" => 3471473988,
|
401
|
+
"6hFyvS" => 3470566524,
|
402
|
+
"6hCxUM" => 3469979153,
|
403
|
+
"6hCmje" => 3469940145,
|
404
|
+
"6hC87z" => 3469895737,
|
405
|
+
"6hC4mV" => 3469883113,
|
406
|
+
"6hQXaJ" => 3472398736,
|
407
|
+
"6hP6Tw" => 3472037848,
|
408
|
+
"6hLx7r" => 3471537361,
|
409
|
+
"6hFvYh" => 3470557964,
|
410
|
+
"6hEPWM" => 3470423317,
|
411
|
+
"6hDKDT" => 3470213769,
|
412
|
+
"6hBrcn" => 3469761455,
|
413
|
+
"6hBkh4" => 3469741543,
|
414
|
+
"6hMdbq" => 3471668788,
|
415
|
+
"6hK3cE" => 3471244996,
|
416
|
+
"6hJSUj" => 3471213714,
|
417
|
+
"6hJvFs" => 3471142324,
|
418
|
+
"6hHVMu" => 3471028298,
|
419
|
+
"6hHUZG" => 3471025642,
|
420
|
+
"6hHeVT" => 3470894225,
|
421
|
+
"6hFqjr" => 3470538949,
|
422
|
+
"6hETNt" => 3470436291,
|
423
|
+
"6hEPkX" => 3470421297,
|
424
|
+
"6hCVrB" => 3470051585,
|
425
|
+
"6hCE2V" => 3469999751,
|
426
|
+
"6hNe3j" => 3471866794,
|
427
|
+
"6hKjmA" => 3471299338,
|
428
|
+
"6hHbMp" => 3470883641,
|
429
|
+
"6hGWJ7" => 3470836354,
|
430
|
+
"6hGn3F" => 3470723055,
|
431
|
+
"6hFoKL" => 3470533690,
|
432
|
+
"6hETWx" => 3470436759,
|
433
|
+
"6hPaH5" => 3472050698,
|
434
|
+
"6hNFFf" => 3471956400,
|
435
|
+
"6hNnyp" => 3471895451,
|
436
|
+
"6hM7ra" => 3471649459,
|
437
|
+
"6hHof7" => 3470922194,
|
438
|
+
"6hH8KM" => 3470873455,
|
439
|
+
"6hGbCG" => 3470688024,
|
440
|
+
"6hDXaB" => 3470252497,
|
441
|
+
"6hDSF2" => 3470237383,
|
442
|
+
"6hDfq8" => 3470115415,
|
443
|
+
"6hCqqR" => 3469953985,
|
444
|
+
"6hPpj7" => 3472096462,
|
445
|
+
"6hMSHG" => 3471798434,
|
446
|
+
"6hKyF6" => 3471347507,
|
447
|
+
"6hK33v" => 3471244465,
|
448
|
+
"6hJwva" => 3471145091,
|
449
|
+
"6hGX9e" => 3470837753,
|
450
|
+
"6hFWeR" => 3470639603,
|
451
|
+
"6hD8oF" => 3470091783,
|
452
|
+
"6hCopg" => 3469947165,
|
453
|
+
"6hC9L8" => 3469901279,
|
454
|
+
"6hBhS4" => 3469733423,
|
455
|
+
"6hMQXy" => 3471792510,
|
456
|
+
"6hLoRU" => 3471509606,
|
457
|
+
"6hKCib" => 3471359692,
|
458
|
+
"6hKder" => 3471278739,
|
459
|
+
"6hHYPy" => 3471038510,
|
460
|
+
"6hD4hz" => 3470077973,
|
461
|
+
"6hPgTS" => 3472071508,
|
462
|
+
"6hNXii" => 3472008951,
|
463
|
+
"6hKYzE" => 3471427928,
|
464
|
+
"6hKSr2" => 3471407243,
|
465
|
+
"6hG4fB" => 3470663195,
|
466
|
+
"6hFyz2" => 3470566707,
|
467
|
+
"6hFoMT" => 3470533813,
|
468
|
+
"6hC5V4" => 3469888341,
|
469
|
+
"6hBZmZ" => 3469869661,
|
470
|
+
"6hPXKU" => 3472205606,
|
471
|
+
"6hHVwm" => 3471027420,
|
472
|
+
"6hCzFH" => 3469985123,
|
473
|
+
"6hCvsM" => 3469970917,
|
474
|
+
"6hChKr" => 3469928151,
|
475
|
+
"6hBv6F" => 3469774581,
|
476
|
+
"6hPf62" => 3472065427,
|
477
|
+
"6hNS4s" => 3471991328,
|
478
|
+
"6hNPXe" => 3471984239,
|
479
|
+
"6hLguh" => 3471484804,
|
480
|
+
"6hJ5zB" => 3471057885,
|
481
|
+
"6hHr6j" => 3470931776,
|
482
|
+
"6hLBUx" => 3471553491,
|
483
|
+
"6hLi1P" => 3471489939,
|
484
|
+
"6hKQ35" => 3471399184,
|
485
|
+
"6hKK67" => 3471382540,
|
486
|
+
"6hHUcT" => 3471022985,
|
487
|
+
"6hGPjm" => 3470811428,
|
488
|
+
"6hF5ti" => 3470472183,
|
489
|
+
"6hDZPz" => 3470261427,
|
490
|
+
"6hC17D" => 3469872193,
|
491
|
+
"6hR7R3" => 3472431292,
|
492
|
+
"6hN7hS" => 3471844090,
|
493
|
+
"6hHqoC" => 3470929416,
|
494
|
+
"6hFDdx" => 3470582339,
|
495
|
+
"6hFzdL" => 3470568896,
|
496
|
+
"6hDuEH" => 3470163357,
|
497
|
+
"6hCaZk" => 3469905409,
|
498
|
+
"6hT2Hw" => 3472804260,
|
499
|
+
"6hPhJY" => 3472074356,
|
500
|
+
"6hKNBy" => 3471394398,
|
501
|
+
"6hJPEq" => 3471202816,
|
502
|
+
"6hGMH7" => 3470806020,
|
503
|
+
"6hGp5L" => 3470729904,
|
504
|
+
"6hFfRV" => 3470507135,
|
505
|
+
"6hESHt" => 3470432637 }
|
506
|
+
|
507
|
+
def test_integer_to_base58
|
508
|
+
INTEGER_EXAMPLES.each do |expected, integer|
|
509
|
+
assert_equal expected, Base58GMP.number_to_base58(integer)
|
510
|
+
end
|
511
|
+
end
|
512
|
+
|
513
|
+
end
|
@@ -0,0 +1,190 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'base58_gmp'
|
3
|
+
|
4
|
+
class TestBase58GMP < Test::Unit::TestCase
|
5
|
+
|
6
|
+
MD5_EXAMPLES = {
|
7
|
+
'adam@t1.foobar.com' => 'cLyvfgxMmJ4imn6MwxfEzb',
|
8
|
+
'alexander@t2.foobar.com' => 'gCWkLkBYTJYgudgBCLPME4',
|
9
|
+
'alice@t3.foobar.com' => 'jbvgmJ6M2f6yqG7BZjyG3V',
|
10
|
+
'andrew@t4.foobar.com' => 'doB64s8kjip3PpUXfPN5DT',
|
11
|
+
'anna@t5.foobar.com' => '52Aa4kRyEQYYngM2ejsgUG',
|
12
|
+
'annabel@t6.foobar.com' => 'uvFiDuVaBvRPZmpeMgfFZc',
|
13
|
+
'anne@t7.foobar.com' => 'p2ixWDwJhR4rLk5Qp8vG3K',
|
14
|
+
'anthony@t8.foobar.com' => 'cVTPsTPL3XGVGNfguAkKi9',
|
15
|
+
'arthur@t9.foobar.com' => 's7MmQ3J7kJdmhs6Dh2iqe5',
|
16
|
+
'asher@t10.foobar.com' => '3AQfYjm3ereVCbk6UiiDpm',
|
17
|
+
'atticus@t11.foobar.com' => '9uNQDKegGRFxssber7iLyd',
|
18
|
+
'august@t12.foobar.com' => 'opKe6gZux8XrkripZoDKvr',
|
19
|
+
'beatrice@t13.foobar.com' => '47ZoJMfkKPjevMifcE9GMq',
|
20
|
+
'benjamin@t14.foobar.com' => 'd6nUszRtqn8ZD7ri3AokAP',
|
21
|
+
'butch@t15.foobar.com' => 'm3DKJwLfHtgm1rGuSgs23s',
|
22
|
+
'caroline@t16.foobar.com' => '8WbKULXo6kwtsHDCHMRDn3',
|
23
|
+
'charles@t17.foobar.com' => 'p6kBDZhrBNCwQUDyMWAu3J',
|
24
|
+
'charlotte@t18.foobar.com' => '9zKZCLPy2ZM8VRxSY8eHh7',
|
25
|
+
'christopher@t19.foobar.com' => '89Zx7mhbQmGektaWbLTD83',
|
26
|
+
'claire@t20.foobar.com' => 'jerxFmdFLZdiPTbtAE4RRW',
|
27
|
+
'clementine@t21.foobar.com' => '49mAPwbkPzywjJDjH8fkji',
|
28
|
+
'daisy@t22.foobar.com' => 'oTcUfyaptjpspnRjisQV4d',
|
29
|
+
'daniel@t23.foobar.com' => 'e5erPbsJTQRZJ21QAzkM3v',
|
30
|
+
'dashiell@t24.foobar.com' => 'fU7jgzihYccLdbRkD4p4Dw',
|
31
|
+
'david@t25.foobar.com' => '3gsB9Mcw1KEcX7rnfxCVWs',
|
32
|
+
'delilah@t26.foobar.com' => 'czpj88sMnUqkcnCF8VjFnt',
|
33
|
+
'dexter@t27.foobar.com' => 'j4Q5Dtq6s37yzRZhbS5YC9',
|
34
|
+
'diana@t28.foobar.com' => '4agRLH5d8g8fwvfBAvNHU9',
|
35
|
+
'dixie@t29.foobar.com' => 'gPaJj7frXSX7m25PRnA8MQ',
|
36
|
+
'duke@t30.foobar.com' => '7EUdabgtAcHwsj8AecAifR',
|
37
|
+
'edie@t31.foobar.com' => '839e6nYnuoKeBA2fcFfjuk',
|
38
|
+
'edith@t32.foobar.com' => 'x5eCBLpMNnkVfdV2hewRZQ',
|
39
|
+
'edward@t33.foobar.com' => 'xoXUn5zuPWKmDbPKnyHmh6',
|
40
|
+
'eleanor@t34.foobar.com' => 'jPuNbfoin3kby2MDCd9yUd',
|
41
|
+
'eliza@t35.foobar.com' => 'tpJVYe8ndsSdQDDXK6RcbD',
|
42
|
+
'elizabeth@t36.foobar.com' => 'd9JhheywJsX4cdbHHxvE1D',
|
43
|
+
'ella@t37.foobar.com' => 'wmnv7JjFZXTBdeto9UK51K',
|
44
|
+
'elvis@t38.foobar.com' => '22UQqi4yQMptXqPQFRWA3m',
|
45
|
+
'emily@t39.foobar.com' => '99JVBHbh4yGMah1iuzYW6',
|
46
|
+
'emma@t40.foobar.com' => 'iPTaT5CfzCkFZyhZn8ZCzM',
|
47
|
+
'eve@t41.foobar.com' => '4vtKxUhbUeVg2V23s97mnL',
|
48
|
+
'faith@t42.foobar.com' => 'r6oLUF5wZA7LFvXuNibGc1',
|
49
|
+
'flora@t43.foobar.com' => 'x6iZQGGyxJAisWwHt8x2ek',
|
50
|
+
'florence@t44.foobar.com' => 'q42bQccuA357rAepcvYjCc',
|
51
|
+
'frances@t45.foobar.com' => 'srDUk7emsidGNjbLFuYnfK',
|
52
|
+
'francis@t46.foobar.com' => 'rW8R8bZXJwhhCEYKQCpbPN',
|
53
|
+
'frank@t47.foobar.com' => 'iDcHArkcoxVyHhCgRruMZW',
|
54
|
+
'frederick@t48.foobar.com' => 'iEBvmYEvswcsZNpbEJzk7C',
|
55
|
+
'george@t49.foobar.com' => '6kDLTgBZmTdfUrKEsexM1b',
|
56
|
+
'georgia@t50.foobar.com' => 'a55XavuUnj6Uozu7gPCsLG',
|
57
|
+
'grace@t51.foobar.com' => 'rnXNjudUh8iU1cFanSmcYr',
|
58
|
+
'gus@t52.foobar.com' => '7aDMJbxRPaaNvKccwX4E8k',
|
59
|
+
'harper@t53.foobar.com' => 'vZ4AV7onL2p5LRcfUDVuiq',
|
60
|
+
'harry@t54.foobar.com' => 'az4wXc5RbGtqPVudFwxue6',
|
61
|
+
'hazel@t55.foobar.com' => 'a1PDVgXfvzj7et4uNajZ6R',
|
62
|
+
'helen@t56.foobar.com' => '21wYy23x9FrFSVTEK5tgM2',
|
63
|
+
'henry@t57.foobar.com' => 'qQu8GQuD73WamRfkZ97XCx',
|
64
|
+
'homer@t58.foobar.com' => 'jpVQDxWQk91cAdiEMYfibY',
|
65
|
+
'hopper@t59.foobar.com' => '5Hcu7XohWve1GDMc5v44Tm',
|
66
|
+
'hudson@t60.foobar.com' => '9cGj3mSi8mDP2QLnqXScFC',
|
67
|
+
'hugh@t61.foobar.com' => 'pptG5q3SGUui2uwGGpcpAE',
|
68
|
+
'hugo@t62.foobar.com' => 'kY5JTDDXRL8MtZrP4BqjuN',
|
69
|
+
'ike@t63.foobar.com' => 'sxsMu3s9XDwzEH5ZSUxvbP',
|
70
|
+
'india@t64.foobar.com' => 't2Rzr9QNoXwEYr18P9QGft',
|
71
|
+
'ione@t65.foobar.com' => 'uLeGJWFRpRWwzLbbCHrs3w',
|
72
|
+
'irene@t66.foobar.com' => 'oV4fFctoDETxRNhyzpsLig',
|
73
|
+
'iris@t67.foobar.com' => 'q3mKKPV83BrL6Ed7N4tQfB',
|
74
|
+
'isla@t68.foobar.com' => 'iSG8o3GpnfFxqxRd3NcJeu',
|
75
|
+
'ivy@t69.foobar.com' => 'cQttt28wtoq3jcGB1zBLVA',
|
76
|
+
'jack@t70.foobar.com' => 'wxArA8fKvrFgz7W7JpMD9u',
|
77
|
+
'jacob@t71.foobar.com' => 'bivemVTZPiBZQ38ZzqWrAC',
|
78
|
+
'james@t72.foobar.com' => 'hNJPaGPKT1YmEHyBkmMsWd',
|
79
|
+
'jane@t73.foobar.com' => 'mpEHWdfJfvTfbqJedP9ZqE',
|
80
|
+
'jean@t74.foobar.com' => 'kkY69EJdQohctAsJQMvmuE',
|
81
|
+
'jill@t75.foobar.com' => '5URSdHeFGbtZ7Z35GpUPgB',
|
82
|
+
'john@t76.foobar.com' => '9FtjroUqSCHb2RCGyBqjAT',
|
83
|
+
'jonathan@t77.foobar.com' => '8nHqePr6kErsi8oHtAceLU',
|
84
|
+
'joseph@t78.foobar.com' => 'kyzmfyyPzCZMeaGnST2Bf2',
|
85
|
+
'judith@t79.foobar.com' => '9r5SHvk4vbxNsahcZ6i2BM',
|
86
|
+
'julia@t80.foobar.com' => 'mkbZ6sbrx3s5DLceRUhqnX',
|
87
|
+
'julian@t81.foobar.com' => 'xwao2JiMxHxQbybEMxHUx4',
|
88
|
+
'june@t82.foobar.com' => '2AJRk8P3JCjRnV2SBhptEg',
|
89
|
+
'kai@t83.foobar.com' => 'qF9STnT3WN9Z5qzSfY85sd',
|
90
|
+
'kate@t84.foobar.com' => 'uxQaYE2WWsQi1YnNWR5xKF',
|
91
|
+
'katherine@t85.foobar.com' => 'vcNFyUwtsKgbHtG3zG98Zq',
|
92
|
+
'kingston@t86.foobar.com' => 'oLvodypvWHCM11xd5xUJGe',
|
93
|
+
'laura@t87.foobar.com' => 'wj48zQvxTCR9aLk63qV4Kw',
|
94
|
+
'lennon@t88.foobar.com' => 'ePKh1xSQpgsiz8v8gdACqc',
|
95
|
+
'leo@t89.foobar.com' => 'cHyotGtfcJnU7VCbJUBecG',
|
96
|
+
'leonora@t90.foobar.com' => 'g3HEhnT2xUSqqSQdbnBdZT',
|
97
|
+
'leopold@t91.foobar.com' => 'oJZSBpt8jrai34aqmG49ig',
|
98
|
+
'levi@t92.foobar.com' => 'vJKcfBSHnwpwZ6g9H29UV9',
|
99
|
+
'lila@t93.foobar.com' => 'c4gm3ivHspRg9Rj6U11a5',
|
100
|
+
'lionel@t94.foobar.com' => 'rSeNeb5CwYajNAb8yLrNcp',
|
101
|
+
'lola@t95.foobar.com' => 'bnkNUMarkMh3TDRtJgBNJE',
|
102
|
+
'louis@t96.foobar.com' => 'ku1kVEn1Y2hjmTJ3KamydJ',
|
103
|
+
'louisa@t97.foobar.com' => 'fBQRiZhJLVUxPpwHVjt6qV',
|
104
|
+
'luca@t98.foobar.com' => 'h9d74J1GYGZ7F9jvJob1ua',
|
105
|
+
'lucy@t99.foobar.com' => '3JAMMqpzhUL1cx9gLAZtAt',
|
106
|
+
'luke@t100.foobar.com' => '78fqBQFx8EBRHhiQdNJvEr',
|
107
|
+
'lulu@t101.foobar.com' => '4Lt6GFG8KwtKDFXxT9ZKZk',
|
108
|
+
'madeline@t102.foobar.com' => 'x1t6CDsqgVFaYQ8t7c1x3r',
|
109
|
+
'magnus@t103.foobar.com' => 'jyUa5mGS5qqLWKqdyM2j7M',
|
110
|
+
'mamie@t104.foobar.com' => 'gon7gmCvbkL1zbyfnU8zki',
|
111
|
+
'margaret@t105.foobar.com' => 'pCtYEFcXX2ccwAnEy9ypzX',
|
112
|
+
'maria@t106.foobar.com' => 'vEE2nbqjWK31Mymb5J7JVV',
|
113
|
+
'marian@t107.foobar.com' => 'oHmtco8KggGsgky3ViPu9h',
|
114
|
+
'mark@t108.foobar.com' => 'rc5LpJLg4UwdzgxqugrDuq',
|
115
|
+
'martha@t109.foobar.com' => 'ruTREKhJqfm1t6yLGM9w17',
|
116
|
+
'martin@t110.foobar.com' => 'e6H2s8W6bTksoVCN86oYGT',
|
117
|
+
'mary@t111.foobar.com' => 'aQjwtP33evg7HJeoV9NuQ8',
|
118
|
+
'matilda@t112.foobar.com' => 'pP9mqi9ZCqaBJQf5BP5zHu',
|
119
|
+
'matthew@t113.foobar.com' => 'iPa4rqs6XBEHXCjjNwfM8X',
|
120
|
+
'michael@t114.foobar.com' => 'o5v95kkqNSty5naX3RMnc4',
|
121
|
+
'millie@t115.foobar.com' => '6uDWP8ieVow3TMZwNfNAXM',
|
122
|
+
'milo@t116.foobar.com' => '7zFWBQK4DLjR6xKCyZfkfb',
|
123
|
+
'minnie@t117.foobar.com' => 'eNJD4n4vii5YWpR4zdaJeV',
|
124
|
+
'moses@t118.foobar.com' => 'rxR5gbUKw3paMpUwtQ1sQA',
|
125
|
+
'nathan@t119.foobar.com' => 'foGEysvSy36aiXbqwSw8zp',
|
126
|
+
'nathaniel@t120.foobar.com' => '5yoDz6zDST9F3yKyUKKHcN',
|
127
|
+
'nicholas@t121.foobar.com' => '37xHbT6Tzd9KcpPVYQNueA',
|
128
|
+
'olive@t122.foobar.com' => 'wmyGY8fyaLBg9QXy46mT7R',
|
129
|
+
'olivia@t123.foobar.com' => 'rR9J61gvnvoL7gPPMSSUnF',
|
130
|
+
'orson@t124.foobar.com' => 'pYUvs2RzKhJ98mtSWCgdcA',
|
131
|
+
'oscar@t125.foobar.com' => '78znFsuexcTXmP7PxwyE6R',
|
132
|
+
'otis@t126.foobar.com' => '2Q8pdN9AmWg8xi2gp6S1mu',
|
133
|
+
'pamela@t127.foobar.com' => 'ij9ddEeBWXc8NrjzoxqeeU',
|
134
|
+
'patricia@t128.foobar.com' => 'sVBFufZC7vbVAra9ZNprvd',
|
135
|
+
'patrick@t129.foobar.com' => '9xLQ7fv3erkjBv6QEa9Ppy',
|
136
|
+
'paul@t130.foobar.com' => '92v4ieSoNv5KAWwqDQaLuv',
|
137
|
+
'pearl@t131.foobar.com' => 'sMtVHCfgoGsXcFL8P2gEv4',
|
138
|
+
'peter@t132.foobar.com' => 'aiDSCwedfswZBEk3p93gg4',
|
139
|
+
'philip@t133.foobar.com' => 'uM6TUDWqaFV8R5htKkpirw',
|
140
|
+
'piper@t134.foobar.com' => 'gPXui9N46dUHj1BuZeuySk',
|
141
|
+
'poppy@t135.foobar.com' => '9oTgGP72muLRPePw86E7yU',
|
142
|
+
'rachel@t136.foobar.com' => 'pbSWqcABLnLtYhS6kQPcSP',
|
143
|
+
'ray@t137.foobar.com' => '95eyDfggw9Cw5dwWwbpo58',
|
144
|
+
'raymond@t138.foobar.com' => '6oJHke65wVydRwbmYnWtKD',
|
145
|
+
'rebecca@t139.foobar.com' => 'qRjaoGKpyGT6SybfEH7wrJ',
|
146
|
+
'richard@t140.foobar.com' => 'fsXYuV8CYEAqix9P8F9KtS',
|
147
|
+
'robert@t141.foobar.com' => 'nWzK2fnDPjs2GFX145e3U1',
|
148
|
+
'roman@t142.foobar.com' => '8pF4mTEVEfEfSNFj4bt635',
|
149
|
+
'romy@t143.foobar.com' => 'bz8Lfj6eSJZZ8PsCqzgiwd',
|
150
|
+
'roscoe@t144.foobar.com' => 'g4Y22G4JMh5Mp6CWrahtLB',
|
151
|
+
'rose@t145.foobar.com' => '9vEznJvECTphuW57y3shkk',
|
152
|
+
'ruby@t146.foobar.com' => 'qvdSAt8t8JfoeM1CvoyvZH',
|
153
|
+
'rufus@t147.foobar.com' => 'fJ3hyQ76sX6QhjJQnxNoyH',
|
154
|
+
'ruth@t148.foobar.com' => 'semaD6BpBCt2TEHes9FY13',
|
155
|
+
'sadie@t149.foobar.com' => 'UdfW5bmddDGjpFt1sZzk4',
|
156
|
+
'sally@t150.foobar.com' => 'eC6eFrxbYxSe8hzLN4aLRu',
|
157
|
+
'samuel@t151.foobar.com' => 'cyBSm8hBKFDmxS6RTgyxTj',
|
158
|
+
'sarah@t152.foobar.com' => 'gEvas2eVntU1vMTLAc22ho',
|
159
|
+
'scarlett@t153.foobar.com' => 'iHE5KNGu64ma8r9VHJAmaQ',
|
160
|
+
'sebastian@t154.foobar.com' => 'bmymJQ3P3Na95Zea5eqnuQ',
|
161
|
+
'silas@t155.foobar.com' => 'qTaWjwsxrgCMA1DRaawEtL',
|
162
|
+
'simon@t156.foobar.com' => '4xbnT82V6YswZD8CADhToa',
|
163
|
+
'sophia@t157.foobar.com' => 'uSsimYXiJfpyVTEniSgdeB',
|
164
|
+
'stella@t158.foobar.com' => 'uhsAzfPV38gccUsiNNp1Ci',
|
165
|
+
'stellan@t159.foobar.com' => 'qwmeRueNtTA6BG87X5qfVi',
|
166
|
+
'stephen@t160.foobar.com' => 'p7LF1KEXBaqcEqqxxFdhLF',
|
167
|
+
'sullivan@t161.foobar.com' => 'sjbpK5vVjj9HEmFuimqw9S',
|
168
|
+
'susannah@t162.foobar.com' => 'wzzfj74UJdELhrLBC6qT32',
|
169
|
+
'talullah@t163.foobar.com' => '6Bv5sQYYGgEH8ocfpyVYEM',
|
170
|
+
'theo@t164.foobar.com' => 'btE6gi4ouzPVVB8vHuuYTz',
|
171
|
+
'theodore@t165.foobar.com' => 'inuCfNZXhBwqAd3eRdmucu',
|
172
|
+
'thomas@t166.foobar.com' => 'xo71nBSArfgxTzjbiu2no1',
|
173
|
+
'timothy@t167.foobar.com' => 'mCpPnySkinUWyL42qxedyd',
|
174
|
+
'victor@t168.foobar.com' => 'ktKMp7zpvznh9eJe5wpGDP',
|
175
|
+
'victoria@t169.foobar.com' => 'm2cfi3nqGKGsnaKKZi6Gng',
|
176
|
+
'vincent@t170.foobar.com' => '4zxVvtDST2izRT5agTNDSq',
|
177
|
+
'violet@t171.foobar.com' => 'mR6C6C3vTeQRW28PfarMW8',
|
178
|
+
'virginia@t172.foobar.com' => 'sgC4TvD2PvgogA9hg9SXwf',
|
179
|
+
'walter@t173.foobar.com' => 'tmSRjaqamj5apt2SZ6Q1f1',
|
180
|
+
'william@t174.foobar.com' => '3CxxK9U1RkWKczEon2nEWh',
|
181
|
+
'zachary@t175.foobar.com' => '6PWcERtfib8AGNLQk3SHVT'
|
182
|
+
}
|
183
|
+
|
184
|
+
def test_md5_base58
|
185
|
+
MD5_EXAMPLES.each do |data, expected|
|
186
|
+
assert_equal expected, Base58GMP.md5_base58(data)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
end
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: base58_gmp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- John Wang
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-11-06 00:00:00 -07:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: Base58 encoding using The GNU Multiple Precision Arithmetic Library (GMP)
|
23
|
+
email: john@johnwang.com
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files:
|
29
|
+
- README.rdoc
|
30
|
+
files:
|
31
|
+
- CHANGELOG
|
32
|
+
- MIT-LICENSE
|
33
|
+
- README.rdoc
|
34
|
+
- Rakefile
|
35
|
+
- VERSION
|
36
|
+
- base58_gmp.gemspec
|
37
|
+
- lib/base58_gmp.rb
|
38
|
+
- test/test_base58_gmp.rb
|
39
|
+
- test/test_md5_base58.rb
|
40
|
+
has_rdoc: true
|
41
|
+
homepage: http://rubygems.org/gems/base58_gmp
|
42
|
+
licenses: []
|
43
|
+
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options: []
|
46
|
+
|
47
|
+
require_paths:
|
48
|
+
- lib
|
49
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
hash: 3
|
55
|
+
segments:
|
56
|
+
- 0
|
57
|
+
version: "0"
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
hash: 3
|
64
|
+
segments:
|
65
|
+
- 0
|
66
|
+
version: "0"
|
67
|
+
requirements: []
|
68
|
+
|
69
|
+
rubyforge_project:
|
70
|
+
rubygems_version: 1.3.7
|
71
|
+
signing_key:
|
72
|
+
specification_version: 3
|
73
|
+
summary: High speed Base58 encoding using GMP with MD5 support
|
74
|
+
test_files: []
|
75
|
+
|