Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

Hash and expire OTPs

A six-digit code has only one million possibilities. A plain hash is weak protection for a leaked table. Keep the HMAC key outside the table. Store the HMAC and an expiresAt Unix timestamp in seconds. Check expiry in the verifier and consume the code with a conditional update. DynamoDB TTL later clears the row.

Hash and expire OTPs. A six-digit code has only one million possibilities. A plain hash is weak protection for a leaked table. Keep the HMAC key outside the table. Store the HMAC and an expiresAt Unix timestamp in seconds. Check expiry in the verifier and consume the code with a conditional update. DynamoDB TTL later clears the row.
Hash and expire OTPs · Download PNG
Read card text

What this card says

Small code space

A six-digit code has only one million possibilities. A plain hash is weak protection for a leaked table.

Use a keyed HMAC

Keep the HMAC key outside the table. Store the HMAC and an expiresAt Unix timestamp in seconds.

Expire and consume

Check expiry in the verifier and consume the code with a conditional update. DynamoDB TTL later clears the row.

Open the lesson

See all AWS revision cards