Skip to content

Conversation

@prashanOS
Copy link

@prashanOS prashanOS commented Sep 29, 2022

Verification in this context means we calculate the HMAC ourselves from the data, IV, and key and compare it against the HMAC that was provided.

Added tests to ensure happy case encryption and decryption works as well as mutated data, iv, and hmac values.

@prashanOS prashanOS marked this pull request as ready for review September 29, 2022 17:35
@prashanOS prashanOS merged commit f67314f into master Sep 29, 2022
val providedHmac = decode(encryptedPayload.hmac)

// verify hmac
with(HMac(SHA256Digest())) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would probably be nice of us to contribute this back to the main lib at some point. Maybe just create a cleaned up version to PR off of that library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants