403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/postcss-url/src/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/postcss-url/src/lib/hash.js
'use strict';

const crypto = require('crypto');
const xxh = require('xxhashjs');
const HEXBASE = 16;

const defaultHashOptions = {
    method: 'xxhash32',
    shrink: 8,
    append: false
};

const getxxhash = (content, options) => {
    const hashFunc = options.method === 'xxhash32' ? xxh.h32 : xxh.h64;
    const seed = 0;

    return hashFunc(seed)
        .update(content)
        .digest()
        .toString(HEXBASE);
};

const getHash = (content, options) => {
    if (options.method && typeof options.method === 'function') {
        return options.method(content);
    }

    if (options.method && options.method.indexOf('xxhash') === 0) {
        return getxxhash(content, options);
    }

    try {
        const hashFunc = crypto.createHash(options.method);

        return hashFunc.update(content)
            .digest('hex');
    } catch (e) {
        return null;
    }
};

module.exports = function(content, options) {
    options = options || defaultHashOptions;

    let hash = getHash(content, options);

    if (hash == null) {
        // bad hash method; fallback to defaults
        // TODO: warning/error reporting?
        hash = getHash(content, defaultHashOptions);
    }

    return options.shrink ? hash.substr(0, options.shrink) : hash;
};

Youez - 2016 - github.com/yon3zu
LinuXploit