From f4375e6742c46b11a7d8ee81194dfae8c844ff0b Mon Sep 17 00:00:00 2001 From: David Barri Date: Sun, 15 Nov 2020 13:26:07 +1100 Subject: [PATCH 1/2] Make crypto.subtle.importKey return a js.Promise[CryptoKey] --- src/main/scala/org/scalajs/dom/crypto/Crypto.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/org/scalajs/dom/crypto/Crypto.scala b/src/main/scala/org/scalajs/dom/crypto/Crypto.scala index e411dfc51..a2517aecd 100644 --- a/src/main/scala/org/scalajs/dom/crypto/Crypto.scala +++ b/src/main/scala/org/scalajs/dom/crypto/Crypto.scala @@ -265,7 +265,7 @@ trait SubtleCrypto extends js.Object { */ def importKey(format: KeyFormat, keyData: BufferSource, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, - keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] = js.native + keyUsages: js.Array[KeyUsage]): js.Promise[CryptoKey] = js.native /** * Returns a Promise of a CryptoKey corresponding to the format, the @@ -280,7 +280,7 @@ trait SubtleCrypto extends js.Object { */ def importKey(format: KeyFormat, keyData: JsonWebKey, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, - keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] = js.native + keyUsages: js.Array[KeyUsage]): js.Promise[CryptoKey] = js.native /** * Returns a Promise of a buffer containing the key in the format requested. From caa307dd349fc6b1d4560807ebdf553afc26ec8d Mon Sep 17 00:00:00 2001 From: David Barri Date: Fri, 20 Aug 2021 12:23:23 +1000 Subject: [PATCH 2/2] Run `sbt prePR` --- api-reports/2_12.txt | 4 ++-- api-reports/2_13.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api-reports/2_12.txt b/api-reports/2_12.txt index 3f4f8df0b..5cdc882f1 100644 --- a/api-reports/2_12.txt +++ b/api-reports/2_12.txt @@ -192,8 +192,8 @@ crypto/SubtleCrypto[JT] def digest(algorithm: HashAlgorithmIdentifier, data: Buf crypto/SubtleCrypto[JT] def encrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): js.Promise[js.Any] crypto/SubtleCrypto[JT] def exportKey(format: KeyFormat, key: CryptoKey): js.Promise[js.Any] crypto/SubtleCrypto[JT] def generateKey(algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] -crypto/SubtleCrypto[JT] def importKey(format: KeyFormat, keyData: BufferSource, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] -crypto/SubtleCrypto[JT] def importKey(format: KeyFormat, keyData: JsonWebKey, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] +crypto/SubtleCrypto[JT] def importKey(format: KeyFormat, keyData: BufferSource, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[CryptoKey] +crypto/SubtleCrypto[JT] def importKey(format: KeyFormat, keyData: JsonWebKey, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[CryptoKey] crypto/SubtleCrypto[JT] def sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): js.Promise[js.Any] crypto/SubtleCrypto[JT] def unwrapKey(format: String, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] crypto/SubtleCrypto[JT] def verify(algorithm: AlgorithmIdentifier, key: CryptoKey, signature: BufferSource, data: BufferSource): js.Promise[js.Any] diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index f726af3aa..954bb9bf8 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -192,8 +192,8 @@ crypto/SubtleCrypto[JT] def digest(algorithm: HashAlgorithmIdentifier, data: Buf crypto/SubtleCrypto[JT] def encrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): js.Promise[js.Any] crypto/SubtleCrypto[JT] def exportKey(format: KeyFormat, key: CryptoKey): js.Promise[js.Any] crypto/SubtleCrypto[JT] def generateKey(algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] -crypto/SubtleCrypto[JT] def importKey(format: KeyFormat, keyData: BufferSource, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] -crypto/SubtleCrypto[JT] def importKey(format: KeyFormat, keyData: JsonWebKey, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] +crypto/SubtleCrypto[JT] def importKey(format: KeyFormat, keyData: BufferSource, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[CryptoKey] +crypto/SubtleCrypto[JT] def importKey(format: KeyFormat, keyData: JsonWebKey, algorithm: KeyAlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[CryptoKey] crypto/SubtleCrypto[JT] def sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): js.Promise[js.Any] crypto/SubtleCrypto[JT] def unwrapKey(format: String, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: Boolean, keyUsages: js.Array[KeyUsage]): js.Promise[js.Any] crypto/SubtleCrypto[JT] def verify(algorithm: AlgorithmIdentifier, key: CryptoKey, signature: BufferSource, data: BufferSource): js.Promise[js.Any]