Generate and verify AES-256-GCM encryption
Recipe ToolsMarketingData ParserUtilitiesDeveloper Tool
What it does
When a scheduled time arrives, this automation parses a JSON document and encrypts it using AES-256-GCM. The encrypted output is then decrypted to verify the result matches the original string.
Who it's for
Engineering teams who need to validate AES-256-GCM cryptography without writing standalone scripts.
How teams use this
Verify encryption and decryption logic
Run the full AES-256-GCM cycle on test data every 5 minutes and confirm the decrypted result matches the input. This validates the cryptographic implementation.
Test with different keys and vectors
Modify the JSON payload to include new secret keys and initialization vectors, then re-run the automation to verify encryption works across different inputs. The steps remain the same.
Add logging to audit encrypted data
Include a step that logs the encrypted Base64 string and authentication tag to a file or database so someone can audit which data was encrypted and when. Set up the log after the encryption step.
How it works
- Run every 5 minutes. This automation starts on a schedule every 5 minutes so the encryption and decryption cycle runs continuously.
- Parse the JSON payload. The Json Parser extracts the string, secret key, and initialization vector from a JSON document so they are ready for encryption.
- Encrypt with AES-256-GCM. Run Ruby code to encrypt the string using the secret key and initialization vector, then encode the result in Base64.
- Decrypt the ciphertext. Run Ruby code to decrypt the Base64-encoded ciphertext and authentication tag back into the original string.
- Convert output to string. Transform the binary decrypted output into a readable string so the plaintext can be compared with the original.