andyperlitch / jsbn

The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.
Other
167 stars 41 forks source link

IE11 TypeError Unable to get property 'getRandomValues' of undefined or null reference #18

Open mike-w-kelly opened 7 years ago

mike-w-kelly commented 7 years ago

I'm having an issue when using open id connect (oidc.js) which references jsbn.

Specifially in IE11 when JSBN is called it uses window.crypto which causes the error:

"Unable to get property 'getRandomValues' of undefined or null reference"

It needs to use window.msCrypto instead to work correctly. I've done a fix which works for me, I'll raise a pull request with the change.

andyperlitch commented 7 years ago

Thanks for the report and thanks for opening #19. I have requested a few changes so take a look.

andyperlitch commented 7 years ago

Whoops did not mean to close this until that PR is merged.