6 lines
142 B
JavaScript
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)
|
||
|
}
|