在不安全的浏览器环境下,浏览器的密码学 API 可能会受限。例如:在使用现代 chromium 内核时,当前域为非 https 的 ip 地址时
crypto.subtle.digest 会不可用(TypeError: Cannot read properties of undefined (reading 'digest')),当前域为 localhost 或者 https 环境时 crypto.subtle.digest 是可用的。