Prune exports

This commit is contained in:
Manav Rathi
2024-11-27 13:56:17 +05:30
parent 2b88cc3621
commit 8eeaa5ea98
2 changed files with 3 additions and 10 deletions

View File

@@ -742,12 +742,12 @@ export const boxSealOpen = async (
* @returns The base64 representation of a 256-bit key suitable for being used
* with libsodium's secretbox APIs.
*/
export async function deriveKey(
export const deriveKey = async (
passphrase: string,
salt: string,
opsLimit: number,
memLimit: number,
) {
) => {
await sodium.ready;
return await toB64(
sodium.crypto_pwhash(
@@ -759,7 +759,7 @@ export async function deriveKey(
sodium.crypto_pwhash_ALG_ARGON2ID13,
),
);
}
};
export async function deriveSensitiveKey(passphrase: string, salt: string) {
await sodium.ready;

View File

@@ -105,13 +105,6 @@ export class CryptoWorker {
return libsodium.generateSubKey(key, subKeyLength, subKeyID, context);
}
async fromUTF8(string: string) {
return libsodium.fromUTF8(string);
}
async toUTF8(data: string) {
return libsodium.toUTF8(data);
}
async toB64(data: Uint8Array) {
return libsodium.toB64(data);
}