Skip to content

Commit

Permalink
Make crypto.subtle.importKey return a js.Promise[CryptoKey]
Browse files Browse the repository at this point in the history
  • Loading branch information
japgolly committed Nov 15, 2020
1 parent 5a502ad commit f4375e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/org/scalajs/dom/crypto/Crypto.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit f4375e6

Please sign in to comment.