import { Sha256 } from '@aws-crypto/sha256-browser'; /** * Returns a SHA256 hash hex string of the 'data' param * @param {string} data * @returns {Promise<string>} * @internal * @ignore */ export async function sha256Hash(data) { const hash = new Sha256(); hash.update(data); const hashedData = await hash.digest(); return window.Buffer.from(hashedData).toString('hex'); }
https://cdn.masto.host/twippedsocial/media_attachments/files/113/278/729/194/036/098/original/834563d21b985e07.png