🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Cryptography Basics: all 10 questions

Quiz: Cryptography Basics · Question 10 of 10

A payment gateway signs webhooks with a secret shared with your server. Which check should your server do?

A payment gateway signs webhooks with a secret shared with your server. Which check should your server do?

  1. A.Decode the body from Base64
  2. B.Compare the IP address only
  3. C.Compute an HMAC of the body with the shared secret and compare it to the received one
  4. D.Encrypt the body with RSA
Answer & explanation

Correct answer: Compute an HMAC of the body with the shared secret and compare it to the received one

HMAC with a shared secret proves the message came from the gateway and was not changed.

Can you get the rest right without peeking?

Take the timed Quiz: Cryptography Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →