Friday, April 04, 2008
window.crypto
Mozilla defines a special JavaScript object to allow web pages access to certain cryptographic related services. These services are a balance between the functionality web pages need, and the requirement to protect users from malicious web sites. Most of these services are available via the JavaScript window object as window.crypto
. For instance, to obtain a ten byte random number using the cryptographic engine, simply call:
var myrandom = window.crypto.random(10);
Services are provided to enable: smart card events, generating certificate requests, importing user certs, generating random numbers, logging out of your tokens, and signing text.
More details here.Labels: ajax, javascript
Doing this in the browser via Ajax could be done this way.
Of course, there are javascript implementations of MD5/SHA1
Too bad IE 4 never copied that particular feature, or perhaps we'd have found a real-world use for it. Oh well....
Links to this post:
<< Home
Subscribe to Posts [Atom]