Hi Supabase Team,
I'm encountering an issue when using the pgsodium extension in my Supabase project. Specifically, I am able to encrypt data, but when attempting to decrypt it, I’m getting an error or unexpected result.
Here’s a summary of the problem:
I’ve set up pgsodium and am using the pgcrypto-like encryption/decryption functions for sensitive data.
The encryption works as expected, but when I attempt to decrypt the data, I either get an error (e.g., "decryption failed") or the result doesn’t match the original plaintext data.
I’ve verified that:
The encryption and decryption keys are correctly configured.
The encryption functions work when used independently.
The correct types are being passed to the decryption function.
Could you provide guidance on what might be going wrong or if there’s a known issue with pgsodium in Supabase? Any help would be greatly appreciated.
Thanks in advance!