import x64Hash from './x64Hash'; //需要引入x64Hash加密算法
function setDomainCookie(key, value, exp) {
if (exp && exp instanceof Date) {
document.cookie = key + "=" + escape(value) + ";path=/;domain=bilibili.com;expires=" + exp;
} else {
document.cookie = key + "=" + escape(value) + ";path=/;domain=bilibili.com";
}
}
function getCanvasFp() {
var result = []
var canvas = document.createElement('canvas')
canvas.width = 2000
canvas.height = 200
canvas.style.display = 'inline'
var ctx = canvas.getContext('2d')
ctx.rect(0, 0, 10, 10)
ctx.rect(2, 2, 6, 6)
result.push('canvas winding:' + ((ctx.isPointInPath(5, 5, 'evenodd') === false) ? 'yes' : 'no'))
ctx.textBaseline = 'alphabetic'
ctx.fillStyle = '#f60'
ctx.fillRect(125, 1, 62, 20)
ctx.fillStyle = '#069'
ctx.font = '11pt no-real-font-123'
ctx.fillText('Cwm fjordbank glyphs vext quiz, \ud83d\ude03', 2, 15)
ctx.fillStyle = 'rgba(102, 204, 0, 0.2)'
ctx.font = '18pt Arial'
ctx.fillText('Cwm fjordbank glyphs vext quiz, \ud83d\ude03', 4, 45)
ctx.globalCompositeOperation = 'multiply'
ctx.fillStyle = 'rgb(255,0,255)'
ctx.beginPath()
ctx.arc(50, 50, 50, 0, Math.PI * 2, true)
ctx.closePath()
ctx.fill()
ctx.fillStyle = 'rgb(0,255,255)'
ctx.beginPath()
ctx.arc(100, 50, 50, 0, Math.PI * 2, true)
ctx.closePath()
ctx.fill()
ctx.fillStyle = 'rgb(255,255,0)'
ctx.beginPath()
ctx.arc(75, 100, 50, 0, Math.PI * 2, true)
ctx.closePath()
ctx.fill()
ctx.fillStyle = 'rgb(255,0,255)'
ctx.arc(75, 75, 75,
js获取设备指纹
最新推荐文章于 2024-06-11 17:40:34 发布
本文介绍了如何使用JavaScript在前端和移动开发中获取设备指纹信息,包括浏览器特性、硬件标识符等,以实现用户识别和行为追踪。
摘要由CSDN通过智能技术生成