HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: /var/www/indoadvisory_new/webapp/node_modules/blake3-wasm/dist/node/hash-reader.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const hash_reader_1 = require("../base/hash-reader");
const hash_fn_1 = require("../base/hash-fn");
/**
 * A hash reader for WebAssembly targets.
 */
class NodeHashReader extends hash_reader_1.BaseHashReader {
    /**
     * Converts first 32 bytes of the hash to a string with the given encoding.
     */
    toString(encoding = 'hex') {
        return this.toBuffer().toString(encoding);
    }
    /**
     * Converts first 32 bytes of the hash to an array.
     */
    toBuffer() {
        this.position = BigInt(0);
        return this.read(hash_fn_1.defaultHashLength);
    }
    alloc(bytes) {
        return Buffer.alloc(bytes);
    }
}
exports.NodeHashReader = NodeHashReader;
//# sourceMappingURL=hash-reader.js.map