@adviser/cement 0.2.27 → 0.2.28

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.cts CHANGED
@@ -450,6 +450,7 @@ interface CTArrayBufferView {
450
450
  type CTBufferSource = CTArrayBufferView | ArrayBuffer;
451
451
  interface CryptoRuntime {
452
452
  importKey(format: CTKeyFormat, keyData: CTJsonWebKey | CTBufferSource, algorithm: CTAlgorithmIdentifier | CTRsaHashedImportParams | CTEcKeyImportParams | CTHmacImportParams | CTAesKeyAlgorithm, extractable: boolean, keyUsages: CTKeyUsage[]): Promise<CTCryptoKey>;
453
+ exportKey(format: CTKeyFormat, key: CTCryptoKey): Promise<CTJsonWebKey | ArrayBuffer>;
453
454
  decrypt(algo: {
454
455
  name: string;
455
456
  iv: Uint8Array;
package/index.d.ts CHANGED
@@ -450,6 +450,7 @@ interface CTArrayBufferView {
450
450
  type CTBufferSource = CTArrayBufferView | ArrayBuffer;
451
451
  interface CryptoRuntime {
452
452
  importKey(format: CTKeyFormat, keyData: CTJsonWebKey | CTBufferSource, algorithm: CTAlgorithmIdentifier | CTRsaHashedImportParams | CTEcKeyImportParams | CTHmacImportParams | CTAesKeyAlgorithm, extractable: boolean, keyUsages: CTKeyUsage[]): Promise<CTCryptoKey>;
453
+ exportKey(format: CTKeyFormat, key: CTCryptoKey): Promise<CTJsonWebKey | ArrayBuffer>;
453
454
  decrypt(algo: {
454
455
  name: string;
455
456
  iv: Uint8Array;
package/index.js CHANGED
@@ -8512,6 +8512,7 @@ function digestSHA256(data) {
8512
8512
  function toCryptoRuntime(cryptoOpts = {}) {
8513
8513
  const runtime = {
8514
8514
  importKey: cryptoOpts.importKey || crypto.subtle.importKey.bind(crypto.subtle),
8515
+ exportKey: cryptoOpts.exportKey || crypto.subtle.exportKey.bind(crypto.subtle),
8515
8516
  encrypt: cryptoOpts.encrypt || crypto.subtle.encrypt.bind(crypto.subtle),
8516
8517
  decrypt: cryptoOpts.decrypt || crypto.subtle.decrypt.bind(crypto.subtle),
8517
8518
  randomBytes: cryptoOpts.randomBytes || randomBytes,