- decryptFromJson<T>(params: T): Promise<T extends {
parsedJsonData: {
dataType: "file";
};
} ? ReturnType<typeof decryptToFile> : T extends {
parsedJsonData: {
dataType: "string";
};
} ? ReturnType<typeof decryptToString> : never>
-
Returns Promise<T extends {
parsedJsonData: {
dataType: "file";
};
} ? ReturnType<typeof decryptToFile> : T extends {
parsedJsonData: {
dataType: "string";
};
} ? ReturnType<typeof decryptToString> : never>
Decrypt & return a previously encrypted string (as a string) or file (as a Uint8Array) using the metadata included in the parsed JSON data
Returns
string
or file (as aUint8Array
) depending ondataType
property in the parsed JSON provided