@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
1 lines • 1.3 kB
Source Map (JSON)
{"version":3,"file":"CredoWebCrypto.mjs","names":[],"sources":["../../../src/crypto/webcrypto/CredoWebCrypto.ts"],"sourcesContent":["import * as core from 'webcrypto-core'\nimport type { AgentContext } from '../../agent'\nimport { Hasher } from '../hashes'\nimport { CredoSubtle } from './CredoSubtle'\nimport { CredoWalletWebCrypto } from './CredoWalletWebCrypto'\n\nexport class CredoWebCrypto extends core.Crypto {\n private walletWebCrypto: CredoWalletWebCrypto\n public subtle: CredoSubtle\n\n public constructor(agentContext: AgentContext) {\n super()\n this.walletWebCrypto = new CredoWalletWebCrypto(agentContext)\n this.subtle = new CredoSubtle(this.walletWebCrypto)\n }\n\n public getRandomValues<T extends ArrayBufferView | null>(array: T): T {\n return this.walletWebCrypto.generateRandomValues(array)\n }\n\n public digest(algorithm: string, data: ArrayBuffer): ArrayBuffer {\n return Hasher.hash(new Uint8Array(data), algorithm).buffer as ArrayBuffer\n }\n}\n"],"mappings":";;;;;;;;;AAMA,IAAa,iBAAb,cAAoC,KAAK,OAAO;CAI9C,AAAO,YAAY,cAA4B;AAC7C,SAAO;AACP,OAAK,kBAAkB,IAAI,qBAAqB,aAAa;AAC7D,OAAK,SAAS,IAAI,YAAY,KAAK,gBAAgB;;CAGrD,AAAO,gBAAkD,OAAa;AACpE,SAAO,KAAK,gBAAgB,qBAAqB,MAAM;;CAGzD,AAAO,OAAO,WAAmB,MAAgC;AAC/D,SAAO,OAAO,KAAK,IAAI,WAAW,KAAK,EAAE,UAAU,CAAC"}