指纹算法--先转载过来然后再学习

function getFingerprint() {
                var b = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.104 Safari/537.36 Core/1.53.3408.400 QQBrowser/9.6.12028.400",
                    c ="Current Resolution: 1920x1080, Available Resolution: 1920x1040, Color Depth: 24, Device XDPI: undefined, Device YDPI: undefined",
                    a = "Chromium PDF Viewer, Shockwave Flash, Chromium PDF Viewer, 360SoftMgrPlugin, 360安全卫士 快速登录, Tencent SSO Platform, Google Update, Java Deployment Toolkit 8.0.1210.13, Java(TM) Platform SE 8 U121, NVIDIA 3D Vision, NVIDIA 3D VISION, QQMail Plugin, Tencent FTN plug-in, npQQPhotoDrawEx, QQGamePlugin Pro, QQDownload Plugin",
                    g ="Arabic Transparent, Arial Black, Arial, Calibri Light, Calibri, Cambria Math, Cambria, Candara, Comic Sans MS, Consolas, Constantia, Corbel, Courier New, Ebrima, Franklin Gothic Medium, Gabriola, Georgia, Impact, Lucida Console, Lucida Sans Unicode, MV Boli, Malgun Gothic, Marlett, Microsoft Himalaya, Microsoft JhengHei, Microsoft New Tai Lue, Microsoft PhagsPa, Microsoft Sans Serif, Microsoft Tai Le, Microsoft YaHei, Microsoft Yi Baiti, Mongolian Baiti, PMingLiU-ExtB, Palatino Linotype, Segoe Print, Segoe Script, Segoe UI Light, Segoe UI Semibold, Segoe UI Symbol, Segoe UI, Sylfaen, Symbol, Tahoma, Times New Roman, Trebuchet MS, Verdana, Webdings, Wingdings",
                    n = true,
                    f = true,
                    h = "中国标准时间",
                    u ="zh-CN",
                    m = undefined,
                    e = true,
                    C = getCanvasPrint();
                return murmurhash3_32_gc(b + "|" +
                    c + "|" + a + "|" + g + "|" + n + "|" + f + "|" + h + "|" + u + "|" + m + "|" + e + "|" + C, 256)
            }

function murmurhash3_32_gc(f, d) {
    var e, p, b, c, a;
    e = f.length & 3;
    p = f.length - e;
    b = d;
    for (a = 0; a < p;) c = f.charCodeAt(a) & 255 | (f.charCodeAt(++a) & 255) << 8 | (f.charCodeAt(++a) & 255) << 16 | (f.charCodeAt(++a) & 255) << 24, ++a, c = 3432918353 * (c & 65535) + ((3432918353 * (c >>> 16) & 65535) << 16) & 4294967295, c = c << 15 | c >>> 17, c = 461845907 * (c & 65535) + ((461845907 * (c >>> 16) & 65535) << 16) & 4294967295, b ^= c, b = b << 13 | b >>> 19, b = 5 * (b & 65535) + ((5 * (b >>> 16) & 65535) << 16) & 4294967295, b = (b & 65535) + 27492 + (((b >>> 16) + 58964 & 65535) << 16);
    c = 0;
    switch (e) {
    case 3:
        c ^= (f.charCodeAt(a +
            2) & 255) << 16;
    case 2:
        c ^= (f.charCodeAt(a + 1) & 255) << 8;
    case 1:
        c ^= f.charCodeAt(a) & 255, c = 3432918353 * (c & 65535) + ((3432918353 * (c >>> 16) & 65535) << 16) & 4294967295, c = c << 15 | c >>> 17, b ^= 461845907 * (c & 65535) + ((461845907 * (c >>> 16) & 65535) << 16) & 4294967295
    }
    b ^= f.length;
    b ^= b >>> 16;
    b = 2246822507 * (b & 65535) + ((2246822507 * (b >>> 16) & 65535) << 16) & 4294967295;
    b ^= b >>> 13;
    b = 3266489909 * (b & 65535) + ((3266489909 * (b >>> 16) & 65535) << 16) & 4294967295;
    return (b ^ b >>> 16) >>> 0
};
function getCanvasPrint() {
                return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAUTUlEQ…FQEAABCAs1AAIgIAwBCEuYVCFQEAABCAs1AAIgIAyB/wOyv9gPwlCHEgAAAABJRU5ErkJggg==";
            }
document.write(getFingerprint());
展开阅读全文

没有更多推荐了,返回首页