22
33# Class: WxCrypto
44
5- 微信消息加解密 nodejs 版本
5+ 微信消息加解密nodejs版本
66
77** ` Example ` **
88
@@ -43,16 +43,16 @@ var [err, decryptedXML] = wx.decrypt(signature, timestamp, nonce, encrypted);
4343
4444#### Parameters
4545
46- | Name | Type |
47- | :--------------- | :------------------------------ ------ |
48- | ` token ` | ` string ` |
49- | ` encodingAESKey ` | ` string ` |
50- | ` appID ` | ` string ` |
51- | ` options ` | [ ` Options ` ] ( ../interfaces/Options.md ) |
46+ | Name | Type |
47+ | :------ | :------ |
48+ | ` token ` | ` string ` |
49+ | ` encodingAESKey ` | ` string ` |
50+ | ` appID ` | ` string ` |
51+ | ` options ` | [ ` Options ` ] ( ../interfaces/Options.md ) |
5252
5353#### Defined in
5454
55- [ src/index.ts:48] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L48 )
55+ [ src/index.ts:48] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L48 )
5656
5757## Properties
5858
@@ -62,47 +62,47 @@ var [err, decryptedXML] = wx.decrypt(signature, timestamp, nonce, encrypted);
6262
6363#### Defined in
6464
65- [ src/index.ts:46] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L46 )
65+ [ src/index.ts:46] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L46 )
6666
67- ---
67+ ___
6868
6969### iv
7070
7171• ** iv** : ` Buffer `
7272
7373#### Defined in
7474
75- [ src/index.ts:45] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L45 )
75+ [ src/index.ts:45] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L45 )
7676
77- ---
77+ ___
7878
7979### key
8080
8181• ** key** : ` Buffer `
8282
8383#### Defined in
8484
85- [ src/index.ts:44] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L44 )
85+ [ src/index.ts:44] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L44 )
8686
87- ---
87+ ___
8888
8989### options
9090
9191• ** options** : [ ` Options ` ] ( ../interfaces/Options.md )
9292
9393#### Defined in
9494
95- [ src/index.ts:47] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L47 )
95+ [ src/index.ts:47] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L47 )
9696
97- ---
97+ ___
9898
9999### token
100100
101101• ** token** : ` string `
102102
103103#### Defined in
104104
105- [ src/index.ts:43] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L43 )
105+ [ src/index.ts:43] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L43 )
106106
107107## Methods
108108
@@ -114,12 +114,12 @@ decrypt
114114
115115#### Parameters
116116
117- | Name | Type | Description |
118- | :---------- | :------------------------------------ | :--------------------------------------------- ------ |
119- | ` data ` | ` string ` | encrypt string, eg. oVMc1Y6qP86YfAa.../QGgk503Q68Q== |
120- | ` timestamp ` | ` string ` \| ` number ` | timestamp |
121- | ` nonce ` | ` string ` \| ` number ` | nonce |
122- | ` options ` | [ ` Options ` ] ( ../interfaces/Options.md ) | options |
117+ | Name | Type | Description |
118+ | :------ | :------ | :------ |
119+ | ` data ` | ` string ` | encrypt string, eg. oVMc1Y6qP86YfAa.../QGgk503Q68Q== |
120+ | ` timestamp ` | ` string ` \| ` number ` | timestamp |
121+ | ` nonce ` | ` string ` \| ` number ` | nonce |
122+ | ` options ` | [ ` Options ` ] ( ../interfaces/Options.md ) | options |
123123
124124#### Returns
125125
@@ -129,9 +129,9 @@ xml - xmData, eg. { ComponentVerifyTicket: 'xxxx', ..., AppId: 'xxxx' }
129129
130130#### Defined in
131131
132- [ src/index.ts:135] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L135 )
132+ [ src/index.ts:135] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L135 )
133133
134- ---
134+ ___
135135
136136### encrypt
137137
@@ -142,10 +142,10 @@ Base64Encode(AES256Encrypt[RandomString(16B) + ContentLength(4B) + Content + app
142142
143143#### Parameters
144144
145- | Name | Type | Description |
146- | :-------- | :------------------------------------ | :------------------------------------------------------------------- ------ |
147- | ` data ` | ` Record ` <` string ` , ` unknown ` \> | xml data String, eg. { ComponentVerifyTicket: 'xxxx', ..., AppId: 'xxxx' } |
148- | ` options ` | [ ` Options ` ] ( ../interfaces/Options.md ) | options |
145+ | Name | Type | Description |
146+ | :------ | :------ | :------ |
147+ | ` data ` | ` Record ` <` string ` , ` unknown ` \> | xml data String, eg. { ComponentVerifyTicket: 'xxxx', ..., AppId: 'xxxx' } |
148+ | ` options ` | [ ` Options ` ] ( ../interfaces/Options.md ) | options |
149149
150150#### Returns
151151
@@ -155,9 +155,9 @@ encrypt - encrypt string, eg. oVMc1Y6qP86YfAa.../QGgk503Q68Q==
155155
156156#### Defined in
157157
158- [ src/index.ts:103] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L103 )
158+ [ src/index.ts:103] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L103 )
159159
160- ---
160+ ___
161161
162162### mergeXmlOptions
163163
@@ -167,9 +167,9 @@ mergeXmlOptions
167167
168168#### Parameters
169169
170- | Name | Type | Description |
171- | :-------- | :------------------------------------ | :---- ------ |
172- | ` options ` | [ ` Options ` ] ( ../interfaces/Options.md ) | options |
170+ | Name | Type | Description |
171+ | :------ | :------ | :------ |
172+ | ` options ` | [ ` Options ` ] ( ../interfaces/Options.md ) | options |
173173
174174#### Returns
175175
@@ -179,4 +179,4 @@ xml - xmData, eg. { ComponentVerifyTicket: 'xxxx', ..., AppId: 'xxxx' }
179179
180180#### Defined in
181181
182- [ src/index.ts:79] ( https://github.com/saqqdy/node-wxcrypto/blob/82369d0 /src/index.ts#L79 )
182+ [ src/index.ts:79] ( https://github.com/saqqdy/node-wxcrypto/blob/22555e1 /src/index.ts#L79 )
0 commit comments