Support for new GroupV2 groups

This commit is contained in:
Scott Nonnenberg 2020-09-08 19:25:05 -07:00
parent 1ce0959fa1
commit 7a02cc815d
53 changed files with 7326 additions and 839 deletions

View file

@ -62,6 +62,11 @@ export async function deriveStickerPackKey(packKey: ArrayBuffer) {
return concatenateBytes(part1, part2);
}
export async function computeHash(data: ArrayBuffer): Promise<string> {
const hash = await crypto.subtle.digest({ name: 'SHA-512' }, data);
return arrayBufferToBase64(hash);
}
// High-level Operations
export async function encryptDeviceName(