You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**buffer** - data for encrypting, may be string, Buffer, or any object/array. Arrays and objects will encoded to JSON string first.<br/>
107
122
**encoding** - encoding for output result, may be `'buffer'`, `'binary'`, `'hex'` or `'base64'`. Default `'buffer'`.<br/>
108
123
**source_encoding** - source encoding, works only with string buffer. Can take standard Node.js Buffer encodings (hex, utf8, base64, etc). `'utf8'` by default.<br/>
109
124
110
-
```js
125
+
```javascript
111
126
key.decrypt(buffer, [encoding]);
112
127
```
113
128
Return decrypted data.<br/>
114
129
**buffer** - data for decrypting. Takes Buffer object or base64 encoded string.<br/>
115
130
**encoding** - encoding for result string. Can also take `'buffer'` for raw Buffer object, or `'json'` for automatic JSON.parse result. Default `'buffer'`.
116
131
117
132
### Signing/Verifying
118
-
```js
133
+
```javascript
119
134
key.sign(buffer, [encoding], [source_encoding]);
120
135
```
121
136
Return signature for buffer. All the arguments are the same as for `encrypt` method.
0 commit comments