DOMCrypt Demo 2: Add a 'Contact' to an 'Addressbook'

See https://github.com/daviddahl/domcrypt for source code

Try out the demo:

A 'contact' is the Public Key and associated data of one of the people you communicate with. This data is published on a web page inside of a meta tag, e.g:
<meta name="addressbook-entry" 
            pubkey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1vW1laRyBkIfdeB2GQT+rz4dRwYUMtQJQ4Z8/QJCQj5qFuYKqcUn+8UssedWMjygRME1Eamcv5X5HLvphYMaRufk4PvKXLNq0Xh7cmNLcpQT639v+RjWpvHNWsdtYfd80nKCf1S46TlbH2/aw/+tcdLdj8MOTDtzII2oCcXU8B8PXNf49rcNMv8KagjC6LMQDrgvmZ56T1J3wHtQAH/QXGvh4WjQc2sWC/V+2xGkQL4+4yeP7STJBQXKmmqanExsqmwii1rV0Rd2GQnJRaSj+56HMDbZkLnZsxJExul5vu6ec+nBfACxWDMVCeVWbYxBpfURgC5nDsznkgT5VhXOJwIDAQAB",
            handle="natasha",
            domain="droplettr.com"
            date="1298322911812">
</meta>

DOMCrypt will detect this addressbook-entry tag

The user is prompted to save the entry to the addressbook database, which is just a JSON file in the profile folder.

Getting the addressbook entries

window.pk.mozCipher.getAddressbook(function callback (addressbook){});


      
[1] An approval and whitelist process for pages that request the public key and addressbook is planned