Skip to main content

Function: getMediaKeys()

getMediaKeys(buffer, mediaType): Promise<MediaDecryptionKeyInfo>

Defined in: src/Utils/messages-media.ts:58

generates all the keys required to encrypt/decrypt & sign a media message

Parameters

buffer

undefined | null | string | Uint8Array<ArrayBufferLike>

mediaType

"ppic" | "product" | "image" | "video" | "sticker" | "audio" | "gif" | "ptt" | "thumbnail-document" | "thumbnail-image" | "thumbnail-link" | "thumbnail-video" | "md-app-state" | "md-msg-hist" | "document" | "product-catalog-image" | "payment-bg-image" | "ptv"

Returns

Promise<MediaDecryptionKeyInfo>