I think the issue is with the mapping of $Amount.ciphertext to $AmountType (in order to map that, the “Encapsulate output” option of the Encrypt Field snap needs to be unchecked). I built a test pipeline that looks like this:
![]()
The JSON Generator has simple JSON like this:
[{"msg":"Hello world!"}]
Similar to your setup I used a Passphrase-based Key account type with a simple passphrase.
![]()
Here is the Encrypt Field snap:
![]()
Here is the Decrypt Field snap:
![]()
After validating the pipeline here is the Encrypt Field output:
[
{
"msg": {
"transformation": "AES/GCM/NoPadding",
"iv": "yjvD0qXH0MuwVqKhaDnZbg==",
"type": "STRING",
"ciphertext": "6aJAEWHFctinn8pZUPPLsG+E1OsMH49gEy08xQ==",
"key_params": {
"passphrase": {
"key_gen_iterations": 10000,
"key_gen_algorithm": "PBKDF2WithHmacSHA1",
"key_algorithm": "AES",
"key_salt": "NB8NMQyEqeItdu0tyn8XTga+udA=",
"key_size": 128
}
}
}
}
]
If there is no Mapper snap between the Encrypt Field and Decrypt Field it works just fine, however, if you add a Mapper after validation you can see the Decrypt Field Snap is expecting more information than just the cipher text (look at the target schema on the right):
![]()