Skip to content

Conversation

@diegoocampoh
Copy link

When doing base32.decode(this.key).toString(), the result is an array of unsigned ints, but we are passing it to jssha as BYTES. This causes the values in the negative range to be read as positive, effectively changing the secret.

Since base32.decode(this.key) produces a UINT8ARRAY, the proper parameter to jssha is setHMACKey(base32.decode(this.key), 'UINT8ARRAY')

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.

1 participant