Rocky_Mountain_Vending/.pnpm-store/v10/files/ac/1d3a654c2c7877f4f033d374287b4eef0156e21c6cfa27955a10e2a5ad21457f04e21b22ec65dcaf0e193c380ca193871be1771b79b2cacda58e4265387655
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

60 lines
No EOL
1.6 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const hash_fn_1 = require("./hash-fn");
/**
* Base implementation of hashing.
*/
class BaseHash {
constructor(implementation, alloc, getReader) {
this.alloc = alloc;
this.getReader = getReader;
this.hash = implementation;
}
/**
* @inheritdoc
*/
update(data) {
if (!this.hash) {
throw new Error('Cannot continue updating hashing after dispose() has been called');
}
this.hash.update(hash_fn_1.inputToArray(data));
return this;
}
/**
* @inheritdoc
*/
digest({ length = hash_fn_1.defaultHashLength, dispose = true } = {}) {
if (!this.hash) {
throw new Error('Cannot call digest() after dipose() has been called');
}
const digested = this.alloc(length);
this.hash.digest(digested);
if (dispose) {
this.dispose();
}
return digested;
}
/**
* @inheritdoc
*/
reader({ dispose = true } = {}) {
if (!this.hash) {
throw new Error('Cannot call reader() after dipose() has been called');
}
const reader = this.getReader(this.hash.reader());
if (dispose) {
this.dispose();
}
return reader;
}
/**
* @inheritdoc
*/
dispose() {
var _a;
(_a = this.hash) === null || _a === void 0 ? void 0 : _a.free();
this.hash = undefined;
}
}
exports.BaseHash = BaseHash;
//# sourceMappingURL=hash-instance.js.map