This is a plugin for Insomnia that allows encrypting and decrypting request/response payloads using Node.js crypto.
- Encrypt and decrypt request/response payloads
- Toggle encryption/decryption for individual requests
The plugin provides a response hook that decrypts the response body if decryption is enabled for the request.
- Set the environment variables
crypto-alg
andcrypto-key
in your Insomnia environment. - Enable decryption for the request by using the Toggle Response Decryption action.
The plugin provides a request action to toggle body encryption for individual requests.
- Right-click on the request and select Toggle Request Decryption.
- A notification will appear indicating whether decryption is enabled or disabled for the request.
The following algorithms are supported for encryption and decryption:
aes-256-cbc
aes-192-cbc
aes-128-cbc
-
crypto-alg
: The encryption algorithm to use. -
crypto-key
: The key to use for encryption/decryption. -
crypto-base64
: Whether to encode the encrypted data in base64. Default istrue
.
- Clone the repository or download the source code.
- Navigate to the project directory.
- Install the dependencies:
npm install
- Copy the plugin files to the Insomnia plugins directory:
npm run win-install # for Windows