tink-crypto / tink

Tink is a multi-language, cross-platform, open source library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
https://developers.google.com/tink
Apache License 2.0
13.47k stars 1.18k forks source link

cannot verify signature #715

Closed dreamlin987 closed 11 months ago

dreamlin987 commented 1 year ago

Why do I verify the data returned after Google payment that does not go through the grid successfully, and it always fails to verify the signature, so how to check or solve it?

dreamlin987 commented 1 year ago

String decryptedMessage = new PaymentMethodTokenRecipient.Builder() .fetchSenderVerifyingKeysWith( GooglePaymentsPublicKeysManager.INSTANCE_TEST ) .recipientId("GooglePayPasses") .protocolVersion("ECv2") .addRecipientPrivateKey("MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0waXXXXXX") .build() .unseal(tokenData);

juergw commented 1 year ago

Please be more specific in what the problem is, otherwise we can't help you.

juergw commented 11 months ago

Please check the documentation on: https://developers.google.com/pay/api/web/guides/resources/sample-tokens

I hope that helps.