564
edits
| Line 51: | Line 51: | ||
== Designs == | == Designs == | ||
See http://domcrypt.org and https://github.com/daviddahl/domcrypt | See http://domcrypt.org and https://github.com/daviddahl/domcrypt | ||
The current patch for Firefox has become asynchronous. The API has been renamed "window.cipher" and namespaced for the addition of future APIs. | |||
This is the basic design: | |||
window.cipher.pk.generateKeypair(function callback(aPubKey){}) | |||
window.cipher.pk.getPublicKey(function callback(aPubKey){}) | |||
window.cipher.pk.encrypt(aPlainText, aPublicKey, function callback(aCipherMessage){}) | |||
window.cipher.pk.decrypt(aCipherMessage, function callback(aPlainText){}) | |||
window.cipher.pk.sign(aPlainText, function callback(aSignature){}) | |||
window.cipher.pk.verify(aDecryptedPlainText, aSignature, aPublicKey, function callback(aBoolean){}) | |||
window.cipher.hash.SHA256(aPlainText, function callback(aHash){}) | |||
== Test Plans == | == Test Plans == | ||
edits