google-pay/payment-data-cryptography-dotnet ? reverse-engineered prompt

Reverse engineered prompt

Build me a small C# library that can take a Google Pay payment token and decrypt it, then verify that it is valid. It should follow the payment data cryptography flow from Google Pay, support both ECv1 and ECv2, and work in a normal .NET style so it is easy to use in an app.

I also want a simple way to validate Pass callback messages, with a clean example for both decrypting a message and checking a callback. Use Bouncy Castle for the crypto parts, and keep the project free of extra dependencies if possible.

Please include a couple of usage examples in the README or sample code, and add tests so I can see that the main flows work. If anything needs current Google Pay details or updated docs, look them up online and make sure the implementation matches the latest guidance.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab