BrowserID Key Wrapping: Difference between revisions

Line 9: Line 9:
It goes like this:
It goes like this:


  // web site logs the user in via BrowserID
    // obtain an ID assertion from BrowserID in the normal way
  navigator.id.get(gotAssertion);
 
 
    // generate a key
  function gotAssertion(assertion) {
     var key = generateKey();
     var key = generateKey();
    
    
Line 21: Line 20:
       },
       },
       function(error) {});
       function(error) {});
  }


The key must be base64-encoded. The wrappedKey that is passed back is also base64-encoded. The plaintext is expected to be fairly short: mostly this is for wrapping other keys.
The key must be base64-encoded. The wrappedKey that is passed back is also base64-encoded. The plaintext is expected to be fairly short: mostly this is for wrapping other keys.
668

edits