export const SHA1Hash = async (str: string) => { const enc = new TextEncoder(); const hash = await crypto.subtle.digest('SHA-1', enc.encode(str)); return Array.from(new Uint8Array(hash)) .map((v) => v.toString(16).padStart(2, '0')) .join(''); };