rendezvous/www/lib/hash.js

6 lines
142 B
JavaScript
Raw Normal View History

2023-06-21 15:33:47 +00:00
export default async function hash(n,name){
n = n || false
name = name || 'SHA-256'
return await window.crypto.subtle.digest({name},n)
}