Use
This commit is contained in:
@@ -69,6 +69,10 @@ export const _decryptMetadataJSON_New = async (
|
||||
) as unknown;
|
||||
|
||||
export const _decryptMetadataJSON = async (r: DecryptBlobB64) =>
|
||||
JSON.parse(
|
||||
new TextDecoder().decode(await _decryptAssociatedDataB64(r)),
|
||||
) as unknown;
|
||||
_decryptMetadataJSON_New(
|
||||
{
|
||||
encryptedData: r.encryptedDataB64,
|
||||
decryptionHeader: r.decryptionHeaderB64,
|
||||
},
|
||||
r.keyB64,
|
||||
);
|
||||
|
||||
@@ -200,12 +200,7 @@ export const decryptMetadataJSON_New = (
|
||||
);
|
||||
|
||||
/**
|
||||
* Decrypt the metadata JSON associated with an Ente object.
|
||||
*
|
||||
* This is the sibling of {@link encryptMetadataJSON}.
|
||||
*
|
||||
* @returns The decrypted JSON value. Since TypeScript does not have a native
|
||||
* JSON type, we need to return it as an `unknown`.
|
||||
* Deprecated, retains the old API.
|
||||
*/
|
||||
export const decryptMetadataJSON = (r: DecryptBlobB64) =>
|
||||
inWorker()
|
||||
|
||||
Reference in New Issue
Block a user