encrypt 
Requires a Node.js runtime ('qsu/node')Encrypt with the algorithm of your choice (algorithm default: aes-256-cbc, ivSize default: 16) using a string and a secret (secret).
Parameters
| Name | Type | Required | Default |
|---|---|---|---|
str | string | ● | – |
secret | string | ● | – |
algorithm | string | – | 'aes-256-cbc' |
ivSize | number | – | 16 |
toBase64 | boolean | – | false |
Returns
string
Examples
javascript
encrypt('test', 'secret-key');dart
encrypt('test', 'secret-key');python
encrypt('test', 'secret-key')