rendezvous/www/lib/hash.js
2023-06-21 15:33:47 +00:00

6 lines
142 B
JavaScript

export default async function hash(n,name){
n = n || false
name = name || 'SHA-256'
return await window.crypto.subtle.digest({name},n)
}