src/ecc/key_utils.js
function browserEntropy() {
    let entropyStr = Array(randomBytes(101)).join();
    try {
        entropyStr += (new Date()).toString() + " " + window.screen.height + " " + window.screen.width + " " +
            window.screen.colorDepth + " " + " " + window.screen.availHeight + " " + window.screen.availWidth + " " +
            window.screen.pixelDepth + navigator.language + " " + window.location + " " + window.history.length;

        for (let i = 0, mimeType; i < navigator.mimeTypes.length; i++) {
            mimeType = navigator.mimeTypes[i];
            entropyStr += mimeType.description + " " + mimeType.type + " " + mimeType.suffixes + " ";
        }
    } catch(error) {
        //nodejs:ReferenceError: window is not defined
        entropyStr += hash.sha256((new Date()).toString());
    }

    const b = new Buffer(entropyStr);
    entropyStr += b.toString("binary") + " " + (new Date()).toString();

    let entropy = entropyStr;
    const start_t = Date.now();
    while (Date.now() - start_t < 25)
        entropy = hash.sha256(entropy);

    return entropy;
}
function browserEntropy() {
    let entropyStr = Array(randomBytes(101)).join();
    try {
        entropyStr += (new Date()).toString() + " " + window.screen.height + " " + window.screen.width + " " +
            window.screen.colorDepth + " " + " " + window.screen.availHeight + " " + window.screen.availWidth + " " +
            window.screen.pixelDepth + navigator.language + " " + window.location + " " + window.history.length;

        for (let i = 0, mimeType; i < navigator.mimeTypes.length; i++) {
            mimeType = navigator.mimeTypes[i];
            entropyStr += mimeType.description + " " + mimeType.type + " " + mimeType.suffixes + " ";
        }
    } catch(error) {
        //nodejs:ReferenceError: window is not defined
        entropyStr += hash.sha256((new Date()).toString());
    }

    const b = new Buffer(entropyStr);
    entropyStr += b.toString("binary") + " " + (new Date()).toString();

    let entropy = entropyStr;
    const start_t = Date.now();
    while (Date.now() - start_t < 25)
        entropy = hash.sha256(entropy);

    return entropy;
}
@private
Attempt to gather and hash information from the browser's window, history, and supported mime types.  For non-browser environments this simply includes secure random data.  In any event, the information is re-hashed in a loop for 25 milliseconds seconds.

@return {Buffer} 32 bytes