Handle additional errors in attachment_channel

This commit is contained in:
Fedor Indutny 2024-07-15 16:26:27 -07:00 committed by GitHub
parent 07195f4096
commit 11a4b32270
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 10 deletions

View file

@ -6,6 +6,7 @@ import Long from 'long';
import { HKDF } from '@signalapp/libsignal-client';
import * as Bytes from './Bytes';
import { Crypto } from './context/Crypto';
import { calculateAgreement, generateKeyPair } from './Curve';
import { HashType, CipherType, UUID_BYTE_SIZE } from './types/Crypto';
import { ProfileDecryptError } from './types/errors';
@ -734,7 +735,7 @@ export function decryptProfileName(
// SignalContext APIs
//
const { crypto } = globalThis.window?.SignalContext ?? {};
const crypto = globalThis.window?.SignalContext.crypto || new Crypto();
export function sign(key: Uint8Array, data: Uint8Array): Uint8Array {
return crypto.sign(key, data);