( copyWithMessageInfos: string, encryptedNotifUtilsAPI: EncryptedNotifUtilsAPI, )
| 629 | } |
| 630 | |
| 631 | async function prepareLargeNotifData( |
| 632 | copyWithMessageInfos: string, |
| 633 | encryptedNotifUtilsAPI: EncryptedNotifUtilsAPI, |
| 634 | ): Promise<LargeNotifEncryptionResult> { |
| 635 | const encryptionKey = await encryptedNotifUtilsAPI.generateAESKey(); |
| 636 | const encryptedCopyWithMessageInfos = |
| 637 | await encryptedNotifUtilsAPI.encryptWithAESKey( |
| 638 | encryptionKey, |
| 639 | copyWithMessageInfos, |
| 640 | ); |
| 641 | const blobHash = await encryptedNotifUtilsAPI.getBlobHash( |
| 642 | encryptedCopyWithMessageInfos, |
| 643 | ); |
| 644 | const blobHashBase64url = toBase64URL(blobHash); |
| 645 | return { |
| 646 | blobHash: blobHashBase64url, |
| 647 | encryptedCopyWithMessageInfos, |
| 648 | encryptionKey, |
| 649 | }; |
| 650 | } |
| 651 | |
| 652 | export { |
| 653 | prepareEncryptedAPNsVisualNotifications, |
no test coverage detected