src/Javascript/Mozilla/old_snapshots/sync/modules/identity.js
/**
   * Set the active Sync Key.
   *
   * If being set to null, the Sync Key and its derived SyncKeyBundle are
   * removed. However, the Sync Key won't be deleted from the password manager
   * until persistSyncCredentials() is called.
   *
   * If a value is provided, it should be a 26 or 32 character "friendly"
   * Base32 string for which Utils.isPassphrase() returns true.
   *
   * A side-effect of setting the Sync Key is that a SyncKeyBundle is
   * generated. For historical reasons, this will silently error out if the
   * value is not a proper Sync Key (!Utils.isPassphrase()). This should be
   * fixed in the future (once service.js is more sane) to throw if the passed
   * value is not valid.
   */
Set the active Sync Key.
If being set to null, the Sync Key and its derived SyncKeyBundle are
removed. However, the Sync Key won't be deleted from the password manager
until persistSyncCredentials() is called.

If a value is provided, it should be a 26 or 32 character "friendly"
Base32 string for which Utils.isPassphrase() returns true.

A side-effect of setting the Sync Key is that a SyncKeyBundle is
generated. For historical reasons, this will silently error out if the
value is not a proper Sync Key (!Utils.isPassphrase()). This should be
fixed in the future (once service.js is more sane) to throw if the passed
value is not valid.
Set the active Sync Key . If being set to null the Sync Key and its derived SyncKeyBundle are removed . However the Sync Key won ' t be deleted from the password manager until persistSyncCredentials () is called . If a value is provided it should be a 26 or 32 character " friendly " Base32 string for which Utils . isPassphrase () returns true . A side - effect of setting the Sync Key is that a SyncKeyBundle is generated . For historical reasons this will silently error out if the value is not a proper Sync Key ( !Utils . isPassphrase () ) . This should be fixed in the future ( once service . js is more sane ) to throw if the passed value is not valid .
set syncKey(value) {
    if (!value) {
      this._log.info("Sync Key has no value. Deleting.");
      this._syncKey = null;
      this._syncKeyBundle = null;
      this._syncKeyUpdated = true;
      return;
    }
    if (!this.username) {
      throw new Error("syncKey cannot be set before username.");
    }
    this._log.info("Sync Key being updated.");
    this._syncKey = value;
    this._syncKeyBundle = null;
    let bundle = this.syncKeyBundle;
    this._syncKeyUpdated = true;
  }
set syncKey ( value ) { if ( ! value ) { this . _log . info ( "Sync Key has no value. Deleting." ) ; this . _syncKey = null ; this . _syncKeyBundle = null ; this . _syncKeyUpdated = true ; return ; } if ( ! this . username ) { throw new Error ( "syncKey cannot be set before username." ) ; } this . _log . info ( "Sync Key being updated." ) ; this . _syncKey = value ; this . _syncKeyBundle = null ; let bundle = this . syncKeyBundle ; this . _syncKeyUpdated = true ; }
Set the active Sync Key.
Set the active Sync Key .
// Clear any cached Sync Key Bundle and regenerate it.