1- [ index.md - v1.2.0 ] ( ../README.md ) / [ Exports] ( ../modules.md ) / WxCrypto
1+ [ index.md - v1.2.1 ] ( ../README.md ) / [ Exports] ( ../modules.md ) / WxCrypto
22
33# Class: WxCrypto
44
5- 微信消息加解密 nodejs 版本
5+ 微信消息加解密nodejs版本
66
77** ` Example ` **
88
@@ -41,15 +41,15 @@ var [err, decryptedXML] = wx.decrypt(signature, timestamp, nonce, encrypted);
4141
4242#### Parameters
4343
44- | Name | Type |
45- | :--------------- | :- ------ |
46- | ` token ` | ` string ` |
44+ | Name | Type |
45+ | :------ | :------ |
46+ | ` token ` | ` string ` |
4747| ` encodingAESKey ` | ` string ` |
48- | ` appID ` | ` string ` |
48+ | ` appID ` | ` string ` |
4949
5050#### Defined in
5151
52- [ src/index.ts:62] ( https://github.com/saqqdy/node-wxcrypto/blob/567a8c9 /src/index.ts#L62 )
52+ [ src/index.ts:62] ( https://github.com/saqqdy/node-wxcrypto/blob/5664070 /src/index.ts#L62 )
5353
5454## Properties
5555
@@ -59,37 +59,37 @@ var [err, decryptedXML] = wx.decrypt(signature, timestamp, nonce, encrypted);
5959
6060#### Defined in
6161
62- [ src/index.ts:61] ( https://github.com/saqqdy/node-wxcrypto/blob/567a8c9 /src/index.ts#L61 )
62+ [ src/index.ts:61] ( https://github.com/saqqdy/node-wxcrypto/blob/5664070 /src/index.ts#L61 )
6363
64- ---
64+ ___
6565
6666### iv
6767
6868• ** iv** : ` Buffer `
6969
7070#### Defined in
7171
72- [ src/index.ts:60] ( https://github.com/saqqdy/node-wxcrypto/blob/567a8c9 /src/index.ts#L60 )
72+ [ src/index.ts:60] ( https://github.com/saqqdy/node-wxcrypto/blob/5664070 /src/index.ts#L60 )
7373
74- ---
74+ ___
7575
7676### key
7777
7878• ** key** : ` Buffer `
7979
8080#### Defined in
8181
82- [ src/index.ts:59] ( https://github.com/saqqdy/node-wxcrypto/blob/567a8c9 /src/index.ts#L59 )
82+ [ src/index.ts:59] ( https://github.com/saqqdy/node-wxcrypto/blob/5664070 /src/index.ts#L59 )
8383
84- ---
84+ ___
8585
8686### token
8787
8888• ** token** : ` string `
8989
9090#### Defined in
9191
92- [ src/index.ts:58] ( https://github.com/saqqdy/node-wxcrypto/blob/567a8c9 /src/index.ts#L58 )
92+ [ src/index.ts:58] ( https://github.com/saqqdy/node-wxcrypto/blob/5664070 /src/index.ts#L58 )
9393
9494## Methods
9595
@@ -101,11 +101,11 @@ decrypt
101101
102102#### Parameters
103103
104- | Name | Type | Description |
105- | :---------- | :------------------- | :--------------------------------------------- ------ |
106- | ` data ` | ` string ` | encrypt string, eg. oVMc1Y6qP86YfAa.../QGgk503Q68Q== |
107- | ` timestamp ` | ` string ` \| ` number ` | timestamp |
108- | ` nonce ` | ` string ` \| ` number ` | nonce |
104+ | Name | Type | Description |
105+ | :------ | :------ | :------ |
106+ | ` data ` | ` string ` | encrypt string, eg. oVMc1Y6qP86YfAa.../QGgk503Q68Q== |
107+ | ` timestamp ` | ` string ` \| ` number ` | timestamp |
108+ | ` nonce ` | ` string ` \| ` number ` | nonce |
109109
110110#### Returns
111111
@@ -115,9 +115,9 @@ xml - xmData, eg. { ComponentVerifyTicket: 'xxxx', ..., AppId: 'xxxx' }
115115
116116#### Defined in
117117
118- [ src/index.ts:121] ( https://github.com/saqqdy/node-wxcrypto/blob/567a8c9 /src/index.ts#L121 )
118+ [ src/index.ts:121] ( https://github.com/saqqdy/node-wxcrypto/blob/5664070 /src/index.ts#L121 )
119119
120- ---
120+ ___
121121
122122### encrypt
123123
@@ -128,8 +128,8 @@ Base64Encode(AES256Encrypt[RandomString(16B) + ContentLength(4B) + Content + app
128128
129129#### Parameters
130130
131- | Name | Type | Description |
132- | :----- | :----------------------------- | :------------------------------------------------------------------- ------ |
131+ | Name | Type | Description |
132+ | :------ | :------ | :------ |
133133| ` data ` | ` Record ` <` string ` , ` unknown ` \> | xml data String, eg. { ComponentVerifyTicket: 'xxxx', ..., AppId: 'xxxx' } |
134134
135135#### Returns
@@ -140,4 +140,4 @@ encrypt - encrypt string, eg. oVMc1Y6qP86YfAa.../QGgk503Q68Q==
140140
141141#### Defined in
142142
143- [ src/index.ts:93] ( https://github.com/saqqdy/node-wxcrypto/blob/567a8c9 /src/index.ts#L93 )
143+ [ src/index.ts:93] ( https://github.com/saqqdy/node-wxcrypto/blob/5664070 /src/index.ts#L93 )
0 commit comments