mozilla/jwcrypto — pull request #77 by frasertweedale (2013-12-07 10:15:11+00:00)
Title: fix base64url decoding in jsbn BigInteger

The `b64tohex` function doesn't handle base64url encoding correctly,
whereas the `Buffer` `base64` codec handles it fine. The bigint
patch uses `Buffer` whereas the jsbn patch uses `b64tohex`, leading
to inconsistent behaviour between the native and pure-js BigInteger
implementations.

Since more recent versions of the JOSE specifications use base64url
encodings of key parameters, it is important to handle base64url
correctly. Therefore use `Buffer` rather than `b64tohex` in the
jsbn wrapper.