"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSubtle = getSubtle;
const crypto_1 = __importDefault(require("crypto"));
function getSubtle() {
    const subtle = typeof window !== 'undefined' ? window?.crypto?.subtle : crypto_1.default.webcrypto.subtle;
    if (!subtle) {
        const url = 'https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto';
        throw new Error(`SubtleCrypto not supported. This feature is available only in secure contexts (HTTPS) & Node 16+. ${url}`);
    }
    return subtle;
}
//# sourceMappingURL=crossPlatformCrypto.js.map