diff --git a/api-reports/2_12.txt b/api-reports/2_12.txt index a96232668..9bc73d026 100644 --- a/api-reports/2_12.txt +++ b/api-reports/2_12.txt @@ -25158,7 +25158,7 @@ StyleSheetList[JC] def item(index: Int): StyleSheet StyleSheetList[JC] def length: Int StyleSheetList[JC] @scala.scalajs.js.annotation.JSBracketAccess def update(index: Int, v: StyleSheet): Unit SubtleCrypto[JT] def decrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): js.Promise[js.Any] -SubtleCrypto[JT] def deriveBits(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, length: Double): js.Promise[js.Any] +SubtleCrypto[JT] def deriveBits(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, length: Double): js.Promise[ArrayBuffer] SubtleCrypto[JT] def deriveKey(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, derivedKeyType: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] SubtleCrypto[JT] def digest(algorithm: HashAlgorithmIdentifier, data: BufferSource): js.Promise[js.Any] SubtleCrypto[JT] def encrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): js.Promise[js.Any] diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index a96232668..9bc73d026 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -25158,7 +25158,7 @@ StyleSheetList[JC] def item(index: Int): StyleSheet StyleSheetList[JC] def length: Int StyleSheetList[JC] @scala.scalajs.js.annotation.JSBracketAccess def update(index: Int, v: StyleSheet): Unit SubtleCrypto[JT] def decrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): js.Promise[js.Any] -SubtleCrypto[JT] def deriveBits(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, length: Double): js.Promise[js.Any] +SubtleCrypto[JT] def deriveBits(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, length: Double): js.Promise[ArrayBuffer] SubtleCrypto[JT] def deriveKey(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, derivedKeyType: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] SubtleCrypto[JT] def digest(algorithm: HashAlgorithmIdentifier, data: BufferSource): js.Promise[js.Any] SubtleCrypto[JT] def encrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): js.Promise[js.Any] diff --git a/dom/src/main/scala/org/scalajs/dom/SubtleCrypto.scala b/dom/src/main/scala/org/scalajs/dom/SubtleCrypto.scala index b4a224bb9..2b2349983 100644 --- a/dom/src/main/scala/org/scalajs/dom/SubtleCrypto.scala +++ b/dom/src/main/scala/org/scalajs/dom/SubtleCrypto.scala @@ -1,6 +1,7 @@ package org.scalajs.dom import scala.scalajs.js +import scala.scalajs.js.typedarray.ArrayBuffer /** [[http://www.w3.org/TR/WebCryptoAPI/#subtlecrypto-interface w3c ¶14 Subtle Crytpo interface]] * @@ -72,7 +73,8 @@ trait SubtleCrypto extends js.Object { * * Defined at [[http://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-deriveBits ¶14.3.8 The deriveBits method]] */ - def deriveBits(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, length: Double): js.Promise[js.Any] = js.native + def deriveBits(algorithm: AlgorithmIdentifier, baseKey: CryptoKey, + length: Double): js.Promise[ArrayBuffer] = js.native /** Returns a Promise of a CryptoKey corresponding to the format, the algorithm, the raw key data, the usages and the * extractability given as parameters.