unlock = function(key, passphrase) {
    var asbytes = global.e2e.stringToByteArray(passphrase);
    key.cipher.unlockKey(asbytes);
    return key;
  }
Helper function that unlocks a secret key.
@param {!e2e.openpgp.packet.Key} key The secret key to unlock.
@param {string} passphrase The passphrase to use.
@return {!e2e.openpgp.packet.Key} The same key that was passed in.