Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425
  1. import { KeyHandler } from './KeyHandler';
  2. /**
  3. * This module integrates {@link E2EEContext} with {external} in order to set the keys for encryption.
  4. */
  5. export class ExternallyManagedKeyHandler extends KeyHandler {
  6. /**
  7. * Build a new ExternallyManagedKeyHandler instance, which will be used in a given conference.
  8. * @param conference - the current conference.
  9. */
  10. constructor(conference) {
  11. super(conference, { sharedKey: true });
  12. }
  13. /**
  14. * Sets the key and index for End-to-End encryption.
  15. *
  16. * @param {CryptoKey} [keyInfo.encryptionKey] - encryption key.
  17. * @param {Number} [keyInfo.index] - the index of the encryption key.
  18. * @returns {void}
  19. */
  20. setKey(keyInfo) {
  21. this.e2eeCtx.setKey(undefined, { encryptionKey: keyInfo.encryptionKey }, keyInfo.index);
  22. }
  23. }