crypto.subtle.digest('SHA-256', new TextEncoder().encode('你的新密码')) .then(b => console.log([...new Uint8Array(b)].map(x=>x.toString(16).padStart(2,'0')).join('')))