本地运行正常,用别的电脑在局域网连接该电脑服务器就出现安全问题
$window.crypto.subtle.digest({name: algo.name}, data)
.then(function(hash) {
hexString = '', hashResult = new Uint8Array(hash);
for (var i = 0; i < hashResult.length; i++) {
hexString += ("00" + hashResult[i].toString(16)).slice(-2);
}
$scope.hexString_sha1_array[index] = hexString;
console.log(hexString);
})
.catch(function(error) {
console.error(error);
});