jyt_pay 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +72 -0
- data/Rakefile +16 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/JytPay/Api/AuthCard.html +375 -0
- data/doc/JytPay/Api/QueryBalance.html +299 -0
- data/doc/JytPay/Api/QueryOrder.html +372 -0
- data/doc/JytPay/Api/QuickDraw.html +433 -0
- data/doc/JytPay/Api/QuickPay.html +435 -0
- data/doc/JytPay/Api.html +117 -0
- data/doc/JytPay/Client.html +323 -0
- data/doc/JytPay/Encrypt/Des.html +258 -0
- data/doc/JytPay/Encrypt/Rsa.html +232 -0
- data/doc/JytPay/Encrypt.html +127 -0
- data/doc/JytPay/Http/RetCode.html +391 -0
- data/doc/JytPay/Http.html +242 -0
- data/doc/JytPay/Sign/Rsa.html +178 -0
- data/doc/JytPay/Sign.html +115 -0
- data/doc/JytPay/Utils.html +358 -0
- data/doc/JytPay/Xml/MyPrecious.html +220 -0
- data/doc/JytPay/Xml.html +210 -0
- data/doc/JytPay.html +140 -0
- data/doc/_index.html +317 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +492 -0
- data/doc/file.README.html +150 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +150 -0
- data/doc/js/app.js +248 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +203 -0
- data/doc/top-level-namespace.html +110 -0
- data/jyt_pay.gemspec +34 -0
- data/lib/jyt_pay/api/auth_card.rb +60 -0
- data/lib/jyt_pay/api/query_balance.rb +50 -0
- data/lib/jyt_pay/api/query_order.rb +71 -0
- data/lib/jyt_pay/api/quick_draw.rb +75 -0
- data/lib/jyt_pay/api/quick_pay.rb +76 -0
- data/lib/jyt_pay/client.rb +37 -0
- data/lib/jyt_pay/encrypt/des.rb +30 -0
- data/lib/jyt_pay/encrypt/encrypt.rb +7 -0
- data/lib/jyt_pay/encrypt/rsa.rb +20 -0
- data/lib/jyt_pay/http/communicate.rb +77 -0
- data/lib/jyt_pay/http/ret_code.rb +60 -0
- data/lib/jyt_pay/sign/rsa.rb +14 -0
- data/lib/jyt_pay/utils.rb +42 -0
- data/lib/jyt_pay/version.rb +3 -0
- data/lib/jyt_pay/xml/xml.rb +74 -0
- data/lib/jyt_pay.rb +32 -0
- metadata +166 -0
@@ -0,0 +1,232 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: JytPay::Encrypt::Rsa
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "JytPay::Encrypt::Rsa";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (R)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../JytPay.html" title="JytPay (module)">JytPay</a></span></span> » <span class='title'><span class='object_link'><a href="../Encrypt.html" title="JytPay::Encrypt (module)">Encrypt</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Rsa</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: JytPay::Encrypt::Rsa
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/jyt_pay/encrypt/rsa.rb</dd>
|
82
|
+
</dl>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<h2>
|
95
|
+
Class Method Summary
|
96
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
97
|
+
</h2>
|
98
|
+
|
99
|
+
<ul class="summary">
|
100
|
+
|
101
|
+
<li class="public ">
|
102
|
+
<span class="summary_signature">
|
103
|
+
|
104
|
+
<a href="#decrypt-class_method" title="decrypt (class method)">.<strong>decrypt</strong>(key_enc, rsa_private_key) ⇒ Object </a>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
</span>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
119
|
+
|
120
|
+
</li>
|
121
|
+
|
122
|
+
|
123
|
+
<li class="public ">
|
124
|
+
<span class="summary_signature">
|
125
|
+
|
126
|
+
<a href="#encrypt-class_method" title="encrypt (class method)">.<strong>encrypt</strong>(rsa_public_key, key_arg = Encrypt::DES_KEY) ⇒ Object </a>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
</span>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
141
|
+
|
142
|
+
</li>
|
143
|
+
|
144
|
+
|
145
|
+
</ul>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<div id="class_method_details" class="method_details_list">
|
151
|
+
<h2>Class Method Details</h2>
|
152
|
+
|
153
|
+
|
154
|
+
<div class="method_details first">
|
155
|
+
<h3 class="signature first" id="decrypt-class_method">
|
156
|
+
|
157
|
+
.<strong>decrypt</strong>(key_enc, rsa_private_key) ⇒ <tt>Object</tt>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
</h3><table class="source_code">
|
164
|
+
<tr>
|
165
|
+
<td>
|
166
|
+
<pre class="lines">
|
167
|
+
|
168
|
+
|
169
|
+
13
|
170
|
+
14
|
171
|
+
15
|
172
|
+
16</pre>
|
173
|
+
</td>
|
174
|
+
<td>
|
175
|
+
<pre class="code"><span class="info file"># File 'lib/jyt_pay/encrypt/rsa.rb', line 13</span>
|
176
|
+
|
177
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_decrypt'>decrypt</span><span class='lparen'>(</span><span class='id identifier rubyid_key_enc'>key_enc</span><span class='comma'>,</span> <span class='id identifier rubyid_rsa_private_key'>rsa_private_key</span><span class='rparen'>)</span>
|
178
|
+
<span class='id identifier rubyid_ec'>ec</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_key_enc'>key_enc</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_pack'>pack</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>H*</span><span class='tstring_end'>'</span></span>
|
179
|
+
<span class='id identifier rubyid_rsa_private_key'>rsa_private_key</span><span class='period'>.</span><span class='id identifier rubyid_private_decrypt'>private_decrypt</span><span class='lparen'>(</span><span class='id identifier rubyid_ec'>ec</span><span class='rparen'>)</span>
|
180
|
+
<span class='kw'>end</span></pre>
|
181
|
+
</td>
|
182
|
+
</tr>
|
183
|
+
</table>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
<div class="method_details ">
|
187
|
+
<h3 class="signature " id="encrypt-class_method">
|
188
|
+
|
189
|
+
.<strong>encrypt</strong>(rsa_public_key, key_arg = Encrypt::DES_KEY) ⇒ <tt>Object</tt>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
</h3><table class="source_code">
|
196
|
+
<tr>
|
197
|
+
<td>
|
198
|
+
<pre class="lines">
|
199
|
+
|
200
|
+
|
201
|
+
7
|
202
|
+
8
|
203
|
+
9
|
204
|
+
10
|
205
|
+
11</pre>
|
206
|
+
</td>
|
207
|
+
<td>
|
208
|
+
<pre class="code"><span class="info file"># File 'lib/jyt_pay/encrypt/rsa.rb', line 7</span>
|
209
|
+
|
210
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_encrypt'>encrypt</span><span class='lparen'>(</span><span class='id identifier rubyid_rsa_public_key'>rsa_public_key</span><span class='comma'>,</span> <span class='id identifier rubyid_key_arg'>key_arg</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Encrypt.html" title="JytPay::Encrypt (module)">Encrypt</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Encrypt.html#DES_KEY-constant" title="JytPay::Encrypt::DES_KEY (constant)">DES_KEY</a></span></span><span class='rparen'>)</span>
|
211
|
+
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_key_arg'>key_arg</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_pack'>pack</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>H*</span><span class='tstring_end'>'</span></span>
|
212
|
+
<span class='id identifier rubyid_kenc'>kenc</span> <span class='op'>=</span> <span class='id identifier rubyid_rsa_public_key'>rsa_public_key</span><span class='period'>.</span><span class='id identifier rubyid_public_encrypt'>public_encrypt</span> <span class='id identifier rubyid_key_arg'>key_arg</span>
|
213
|
+
<span class='id identifier rubyid_kenc'>kenc</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>H*</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
214
|
+
<span class='kw'>end</span></pre>
|
215
|
+
</td>
|
216
|
+
</tr>
|
217
|
+
</table>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
</div>
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div id="footer">
|
225
|
+
Generated on Thu Nov 2 20:02:48 2017 by
|
226
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
227
|
+
0.9.9 (ruby-2.3.5).
|
228
|
+
</div>
|
229
|
+
|
230
|
+
</div>
|
231
|
+
</body>
|
232
|
+
</html>
|
@@ -0,0 +1,127 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: JytPay::Encrypt
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "JytPay::Encrypt";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (E)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../JytPay.html" title="JytPay (module)">JytPay</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Encrypt</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: JytPay::Encrypt
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/jyt_pay/encrypt/des.rb<span class="defines">,<br />
|
82
|
+
lib/jyt_pay/encrypt/rsa.rb,<br /> lib/jyt_pay/encrypt/encrypt.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Defined Under Namespace</h2>
|
89
|
+
<p class="children">
|
90
|
+
|
91
|
+
|
92
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Encrypt/Des.html" title="JytPay::Encrypt::Des (module)">Des</a></span>, <span class='object_link'><a href="Encrypt/Rsa.html" title="JytPay::Encrypt::Rsa (module)">Rsa</a></span>
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
</p>
|
98
|
+
|
99
|
+
<h2>Constant Summary</h2>
|
100
|
+
<dl class="constants">
|
101
|
+
|
102
|
+
<dt id="DES_KEY-constant" class="">DES_KEY =
|
103
|
+
|
104
|
+
</dt>
|
105
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>12345678</span><span class='tstring_end'>"</span></span></pre></dd>
|
106
|
+
|
107
|
+
</dl>
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<div id="footer">
|
120
|
+
Generated on Thu Nov 2 20:02:48 2017 by
|
121
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
122
|
+
0.9.9 (ruby-2.3.5).
|
123
|
+
</div>
|
124
|
+
|
125
|
+
</div>
|
126
|
+
</body>
|
127
|
+
</html>
|