@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
23 lines (22 loc) • 761 B
JavaScript
import { Hasher } from "../hashes/Hasher.mjs";
import "../hashes/index.mjs";
import { CredoSubtle } from "./CredoSubtle.mjs";
import { CredoWalletWebCrypto } from "./CredoWalletWebCrypto.mjs";
import * as core from "webcrypto-core";
//#region src/crypto/webcrypto/CredoWebCrypto.ts
var CredoWebCrypto = class extends core.Crypto {
constructor(agentContext) {
super();
this.walletWebCrypto = new CredoWalletWebCrypto(agentContext);
this.subtle = new CredoSubtle(this.walletWebCrypto);
}
getRandomValues(array) {
return this.walletWebCrypto.generateRandomValues(array);
}
digest(algorithm, data) {
return Hasher.hash(new Uint8Array(data), algorithm).buffer;
}
};
//#endregion
export { CredoWebCrypto };
//# sourceMappingURL=CredoWebCrypto.mjs.map