"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/** @hidden */
exports.crypto = {
    subtle: {
        digest(algo, data, encoding) {
            return bridge.dispatch("digestHash", algo, data, encoding);
        },
        digestSync(algo, data, encoding) {
            return bridge.dispatchSync("digestHashAsync", algo, data, encoding);
        }
    },
    getRandomValues(typedArray) {
        if (!(typedArray instanceof Uint8Array)) {
            throw new Error("Only Uint8Array are supported at present");
        }
        const newArr = new Uint8Array(bridge.dispatchSync("getRandomValues", typedArray.length));
        typedArray.set(newArr);
        return;
    }
};
//# sourceMappingURL=crypto.js.map