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
Subscribe to Posts [Atom]