Skip to content

calculateKeyCheck

calculateKeyCheck(key, iv?): Promise<AESEncryptedSecretStoragePayload>

Defined in: src/secret-storage.ts:709

Calculate the MAC for checking the key. See https://spec.matrix.org/v1.11/client-server-api/#msecret_storagev1aes-hmac-sha2, steps 3 and 4.

Uint8Array<ArrayBuffer>

the key to use

string

The initialization vector as a base64-encoded string. If omitted, a random initialization vector will be created.

Promise<AESEncryptedSecretStoragePayload>

An object that contains, mac and iv properties.