@@ -187,26 +187,26 @@ Params:
187187* secret
188188
189189``` java
190- String baseString = " GET&https://<<URL>/api/v1/&ap=裕廊坊 心邻坊&<<authPrefix>>_app_id=<<appId>>&<<authPrefix>>_nonce=7231415196459608363&<<authPrefix>>_signature_method=SHA256withRSA&<<authPrefix>>_timestamp=1502164219425&<<authPrefix>>_version=1.0&oq=c# nunit mac&q=c# nunit mac" ;
191- String alias = " alpha" ;
192- String password = " <<passphrase>>" ;
193- String keyStoreFileName = " certificates/alpha.test.p12" ;
194- String publicCertFileName = " certificates/alpha.test.cer" ;
195-
196- try {
197-
198- PrivateKey privateKey = ApiAuthorization . getPrivateKeyFromKeyStore(keyStoreFileName, password, alias);
199-
200- String signature = ApiAuthorization . getL2Signature(baseString, privateKey);
201-
202- System . out. println(expectedSignature);
203- System . out. println(signature);
204-
205- PublicKey publicKey = ApiAuthorization . getPublicKeyFromX509Certificate(publicCertFileName);
206-
207- } catch (ApexUtilLibException e) {
208- e. printStackTrace();
209- }
190+ String baseString = " GET&https://<<URL>/api/v1/&ap=裕廊坊 心邻坊&<<authPrefix>>_app_id=<<appId>>&<<authPrefix>>_nonce=7231415196459608363&<<authPrefix>>_signature_method=SHA256withRSA&<<authPrefix>>_timestamp=1502164219425&<<authPrefix>>_version=1.0&oq=c# nunit mac&q=c# nunit mac" ;
191+ String alias = " alpha" ;
192+ String password = " <<passphrase>>" ;
193+ String keyStoreFileName = " certificates/alpha.test.p12" ;
194+ String publicCertFileName = " certificates/alpha.test.cer" ;
195+
196+ try {
197+
198+ PrivateKey privateKey = ApiAuthorization . getPrivateKeyFromKeyStore(keyStoreFileName, password, alias);
199+
200+ String signature = ApiAuthorization . getL2Signature(baseString, privateKey);
201+
202+ System . out. println(expectedSignature);
203+ System . out. println(signature);
204+
205+ PublicKey publicKey = ApiAuthorization . getPublicKeyFromX509Certificate(publicCertFileName);
206+
207+ } catch (ApexUtilLibException e) {
208+ e. printStackTrace();
209+ }
210210
211211```
212212
@@ -227,32 +227,32 @@ Params:
227227
228228
229229``` java
230- String url = " https://<<URL>>/api/v1/?ap=裕廊坊%20心邻坊" ;
231- String certFileName = " certificates/alpha.test.p12" ;
232- String password = " <<passphrase>>" ;
233- String alias = " alpha" ;
234- String appId = " <<appId>>" ;
235- String nonce = null ;
236- String timestamp = null ;
237-
238- try {
239- String signature = ApiAuthorization . getToken(" http://api.test.io/l2" , " <<authPrefix>>" , " get" , url, appId, null , null , password, alias, certFileName, nonce, timestamp);
240- } catch (ApiUtilException e) {
241- e. printStackTrace();
242- }
230+ String url = " https://<<URL>>/api/v1/?ap=裕廊坊%20心邻坊" ;
231+ String certFileName = " certificates/alpha.test.p12" ;
232+ String password = " <<passphrase>>" ;
233+ String alias = " alpha" ;
234+ String appId = " <<appId>>" ;
235+ String nonce = null ;
236+ String timestamp = null ;
237+
238+ try {
239+ String signature = ApiAuthorization . getToken(" http://api.test.io/l2" , " <<authPrefix>>" , " get" , url, appId, null , null , password, alias, certFileName, nonce, timestamp);
240+ } catch (ApiUtilException e) {
241+ e. printStackTrace();
242+ }
243243```
244244### Release:
245- + Checkout CHANGELOG.md
245+ + Checkout CHANGELOG.md for releases
246246
247- ### Contribution :
247+ ### Contributing :
248248We welcome your involvement, be it fixing bugs or implementing new features that you find relevant to this library.
249249
250250To contribute, you may follow the steps below:
2512511 . Fork the repo
2522522 . Create a new branch from ` development ` to work on your contribution
2532533 . Create a pull request back when you are done
254254
255- Alternatively, you can raise an issue for this Github repository.
255+ Alternatively, you can raise an issue within this Github repository.
256256
257257### Reference:
258258+ [ UTF-8 in Gradle] ( https://stackoverflow.com/questions/21267234/show-utf-8-text-properly-in-gradle )
0 commit comments