How is the hash string after 'tv.1~em.' generated?
const inputEmail="[email protected]";
const outputStr=await get_SHA256_WebsafeBase64(inputEmail);
/*-++-++++=-++---+-=-++++---=-++++--+=-++++-+-=--+-+++-=-++---++=-++-++++=-++-++-+*/
async function get_SHA256_WebsafeBase64(str) {
const encoder = new TextEncoder();
const data = encoder.encode(str);
const hashBuffer = await crypto.subtle.digest('SHA-256', data);
const hashArray = Array.from(new Uint8Array(hashBuffer));
const hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');
const hashBase64 = btoa(String.fromCharCode(...hashArray));
const websafeBase64 = hashBase64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
console.log('result:',websafeBase64)
return websafeBase64;
}