mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
fix: type-cast sharingKey in crypto tests
This commit is contained in:
@@ -123,7 +123,7 @@ describe("encryptImage / decryptImage", () => {
|
|||||||
|
|
||||||
const result = await utils.encryptImage(file, masterKey);
|
const result = await utils.encryptImage(file, masterKey);
|
||||||
const encryptedLetter = await utils.encryptLetter("test", masterKey);
|
const encryptedLetter = await utils.encryptLetter("test", masterKey);
|
||||||
const sharingKey = encryptedLetter.sharingKey;
|
const sharingKey = encryptedLetter.sharingKey as string;
|
||||||
|
|
||||||
const blobUrl = await utils.decryptImageWithSharingKey(
|
const blobUrl = await utils.decryptImageWithSharingKey(
|
||||||
result.encryptedBlob,
|
result.encryptedBlob,
|
||||||
@@ -145,7 +145,8 @@ describe("Sharing Key Decryption (TDD)", () => {
|
|||||||
const letterContent = "hello, guest";
|
const letterContent = "hello, guest";
|
||||||
|
|
||||||
const encryptedLetter = await utils.encryptLetter(letterContent, masterKey);
|
const encryptedLetter = await utils.encryptLetter(letterContent, masterKey);
|
||||||
const sharingKey = encryptedLetter.sharingKey;
|
const sharingKey = encryptedLetter.sharingKey as string;
|
||||||
|
|
||||||
const decryptedLetter = await utils.decryptLetterWithSharingKey(
|
const decryptedLetter = await utils.decryptLetterWithSharingKey(
|
||||||
encryptedLetter.encrypted_content,
|
encryptedLetter.encrypted_content,
|
||||||
sharingKey,
|
sharingKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user