Skip to content

Commit 8ae594b

Browse files
committed
Make crypto object behave like JSGlobal, h/t @sjrd
1 parent 7b9fc3c commit 8ae594b

File tree

5 files changed

+195
-185
lines changed

5 files changed

+195
-185
lines changed

api-reports/2_12.txt

Lines changed: 85 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -25384,88 +25384,91 @@ XPathResult[JO] val ORDERED_NODE_SNAPSHOT_TYPE: Int
2538425384
XPathResult[JO] val STRING_TYPE: Int
2538525385
XPathResult[JO] val UNORDERED_NODE_ITERATOR_TYPE: Int
2538625386
XPathResult[JO] val UNORDERED_NODE_SNAPSHOT_TYPE: Int
25387-
crypto/GlobalCrypto[JO] val crypto: Crypto (@deprecated in 2.0.0)
25388-
crypto/package[SO] type AesCbcParams = dom.AesCbcParams (@deprecated in 2.0.0)
25389-
crypto/package[SO] type AesCfbParams = dom.AesCfbParams (@deprecated in 2.0.0)
25390-
crypto/package[SO] type AesCmacParams = dom.AesCmacParams (@deprecated in 2.0.0)
25391-
crypto/package[SO] type AesCtrParams = dom.AesCtrParams (@deprecated in 2.0.0)
25392-
crypto/package[SO] type AesDerivedKeyParams = dom.AesDerivedKeyParams (@deprecated in 2.0.0)
25393-
crypto/package[SO] type AesGcmParams = dom.AesGcmParams (@deprecated in 2.0.0)
25394-
crypto/package[SO] type AesKeyAlgorithm = dom.AesKeyAlgorithm (@deprecated in 2.0.0)
25395-
crypto/package[SO] type AesKeyGenParams = dom.AesKeyGenParams (@deprecated in 2.0.0)
25396-
crypto/package[SO] type Algorithm = dom.Algorithm (@deprecated in 2.0.0)
25397-
crypto/package[SO] type AlgorithmIdentifier = dom.AlgorithmIdentifier (@deprecated in 2.0.0)
25398-
crypto/package[SO] type BigInteger = dom.BigInteger (@deprecated in 2.0.0)
25399-
crypto/package[SO] type ConcatParams = dom.ConcatParams (@deprecated in 2.0.0)
25400-
crypto/package[SO] type Crypto = dom.Crypto (@deprecated in 2.0.0)
25401-
crypto/package[SO] type CryptoKey = dom.CryptoKey (@deprecated in 2.0.0)
25402-
crypto/package[SO] type CryptoKeyPair = dom.CryptoKeyPair (@deprecated in 2.0.0)
25403-
crypto/package[SO] type DhImportKeyParams = dom.DhImportKeyParams (@deprecated in 2.0.0)
25404-
crypto/package[SO] type DhKeyAlgorithm = dom.DhKeyAlgorithm (@deprecated in 2.0.0)
25405-
crypto/package[SO] type DhKeyDeriveParams = dom.DhKeyDeriveParams (@deprecated in 2.0.0)
25406-
crypto/package[SO] type DhKeyGenParams = dom.DhKeyGenParams (@deprecated in 2.0.0)
25407-
crypto/package[SO] type EcKeyAlgorithm = dom.EcKeyAlgorithm (@deprecated in 2.0.0)
25408-
crypto/package[SO] type EcKeyGenParams = dom.EcKeyGenParams (@deprecated in 2.0.0)
25409-
crypto/package[SO] type EcKeyImportParams = dom.EcKeyImportParams (@deprecated in 2.0.0)
25410-
crypto/package[SO] type EcdhKeyDeriveParams = dom.EcdhKeyDeriveParams (@deprecated in 2.0.0)
25411-
crypto/package[SO] type EcdsaParams = dom.EcdsaParams (@deprecated in 2.0.0)
25412-
crypto/package[SO] type HashAlgorithm = dom.HashAlgorithm (@deprecated in 2.0.0)
25413-
crypto/package[SO] type HashAlgorithmIdentifier = dom.HashAlgorithmIdentifier (@deprecated in 2.0.0)
25414-
crypto/package[SO] type HkdfCtrParams = dom.HkdfCtrParams (@deprecated in 2.0.0)
25415-
crypto/package[SO] type HmacImportParams = dom.HmacImportParams (@deprecated in 2.0.0)
25416-
crypto/package[SO] type HmacKeyAlgorithm = dom.HmacKeyAlgorithm (@deprecated in 2.0.0)
25417-
crypto/package[SO] type HmacKeyGenParams = dom.HmacKeyGenParams (@deprecated in 2.0.0)
25418-
crypto/package[SO] type JsonWebKey = dom.JsonWebKey (@deprecated in 2.0.0)
25419-
crypto/package[SO] type KeyAlgorithm = dom.KeyAlgorithm (@deprecated in 2.0.0)
25420-
crypto/package[SO] type KeyAlgorithmIdentifier = dom.KeyAlgorithmIdentifier (@deprecated in 2.0.0)
25421-
crypto/package[SO] type KeyFormat = dom.KeyFormat (@deprecated in 2.0.0)
25422-
crypto/package[SO] type KeyType = dom.KeyType (@deprecated in 2.0.0)
25423-
crypto/package[SO] type KeyUsage = dom.KeyUsage (@deprecated in 2.0.0)
25424-
crypto/package[SO] type Pbkdf2Params = dom.Pbkdf2Params (@deprecated in 2.0.0)
25425-
crypto/package[SO] type RsaHashedImportParams = dom.RsaHashedImportParams (@deprecated in 2.0.0)
25426-
crypto/package[SO] type RsaHashedKeyAlgorithm = dom.RsaHashedKeyAlgorithm (@deprecated in 2.0.0)
25427-
crypto/package[SO] type RsaHashedKeyGenParams = dom.RsaHashedKeyGenParams (@deprecated in 2.0.0)
25428-
crypto/package[SO] type RsaKeyAlgorithm = dom.RsaKeyAlgorithm (@deprecated in 2.0.0)
25429-
crypto/package[SO] type RsaKeyGenParams = dom.RsaKeyGenParams (@deprecated in 2.0.0)
25430-
crypto/package[SO] type RsaOaepParams = dom.RsaOaepParams (@deprecated in 2.0.0)
25431-
crypto/package[SO] type RsaOtherPrimesInfo = dom.RsaOtherPrimesInfo (@deprecated in 2.0.0)
25432-
crypto/package[SO] type RsaPssParams = dom.RsaPssParams (@deprecated in 2.0.0)
25433-
crypto/package[SO] type SubtleCrypto = dom.SubtleCrypto (@deprecated in 2.0.0)
25434-
crypto/package[SO] @deprecated("use dom.AesCbcParams instead", "2.0.0") val AesCbcParams = dom.AesCbcParams
25435-
crypto/package[SO] @deprecated("use dom.AesCfbParams instead", "2.0.0") val AesCfbParams = dom.AesCfbParams
25436-
crypto/package[SO] @deprecated("use dom.AesCmacParams instead", "2.0.0") val AesCmacParams = dom.AesCmacParams
25437-
crypto/package[SO] @deprecated("use dom.AesCtrParams instead", "2.0.0") val AesCtrParams = dom.AesCtrParams
25438-
crypto/package[SO] @deprecated("use dom.AesDerivedKeyParams instead", "2.0.0") val AesDerivedKeyParams = dom.AesDerivedKeyParams
25439-
crypto/package[SO] @deprecated("use dom.AesGcmParams instead", "2.0.0") val AesGcmParams = dom.AesGcmParams
25440-
crypto/package[SO] @deprecated("use dom.AesKeyAlgorithm instead", "2.0.0") val AesKeyAlgorithm = dom.AesKeyAlgorithm
25441-
crypto/package[SO] @deprecated("use dom.AesKeyGenParams instead", "2.0.0") val AesKeyGenParams = dom.AesKeyGenParams
25442-
crypto/package[SO] @deprecated("use dom.ConcatParams instead", "2.0.0") val ConcatParams = dom.ConcatParams
25443-
crypto/package[SO] @deprecated("use dom.DhImportKeyParams instead", "2.0.0") val DhImportKeyParams = dom.DhImportKeyParams
25444-
crypto/package[SO] @deprecated("use dom.DhKeyAlgorithm instead", "2.0.0") val DhKeyAlgorithm = dom.DhKeyAlgorithm
25445-
crypto/package[SO] @deprecated("use dom.DhKeyDeriveParams instead", "2.0.0") val DhKeyDeriveParams = dom.DhKeyDeriveParams
25446-
crypto/package[SO] @deprecated("use dom.DhKeyGenParams instead", "2.0.0") val DhKeyGenParams = dom.DhKeyGenParams
25447-
crypto/package[SO] @deprecated("use dom.EcKeyAlgorithm instead", "2.0.0") val EcKeyAlgorithm = dom.EcKeyAlgorithm
25448-
crypto/package[SO] @deprecated("use dom.EcKeyGenParams instead", "2.0.0") val EcKeyGenParams = dom.EcKeyGenParams
25449-
crypto/package[SO] @deprecated("use dom.EcKeyImportParams instead", "2.0.0") val EcKeyImportParams = dom.EcKeyImportParams
25450-
crypto/package[SO] @deprecated("use dom.EcdhKeyDeriveParams instead", "2.0.0") val EcdhKeyDeriveParams = dom.EcdhKeyDeriveParams
25451-
crypto/package[SO] @deprecated("use dom.EcdsaParams instead", "2.0.0") val EcdsaParams = dom.EcdsaParams
25452-
crypto/package[SO] @deprecated("use dom.HashAlgorithm instead", "2.0.0") val HashAlgorithm = dom.HashAlgorithm
25453-
crypto/package[SO] @deprecated("use dom.HkdfCtrParams instead", "2.0.0") val HkdfCtrParams = dom.HkdfCtrParams
25454-
crypto/package[SO] @deprecated("use dom.HmacImportParams instead", "2.0.0") val HmacImportParams = dom.HmacImportParams
25455-
crypto/package[SO] @deprecated("use dom.HmacKeyAlgorithm instead", "2.0.0") val HmacKeyAlgorithm = dom.HmacKeyAlgorithm
25456-
crypto/package[SO] @deprecated("use dom.HmacKeyGenParams instead", "2.0.0") val HmacKeyGenParams = dom.HmacKeyGenParams
25457-
crypto/package[SO] @deprecated("use dom.KeyFormat instead", "2.0.0") val KeyFormat = dom.KeyFormat
25458-
crypto/package[SO] @deprecated("use dom.KeyType instead", "2.0.0") val KeyType = dom.KeyType
25459-
crypto/package[SO] @deprecated("use dom.KeyUsage instead", "2.0.0") val KeyUsage = dom.KeyUsage
25460-
crypto/package[SO] @deprecated("use dom.Pbkdf2Params instead", "2.0.0") val Pbkdf2Params = dom.Pbkdf2Params
25461-
crypto/package[SO] @deprecated("use dom.RsaHashedImportParams instead", "2.0.0") val RsaHashedImportParams = dom.RsaHashedImportParams
25462-
crypto/package[SO] @deprecated("use dom.RsaHashedKeyAlgorithm instead", "2.0.0") val RsaHashedKeyAlgorithm = dom.RsaHashedKeyAlgorithm
25463-
crypto/package[SO] @deprecated("use dom.RsaHashedKeyGenParams instead", "2.0.0") val RsaHashedKeyGenParams = dom.RsaHashedKeyGenParams
25464-
crypto/package[SO] @deprecated("use dom.RsaKeyAlgorithm instead", "2.0.0") val RsaKeyAlgorithm = dom.RsaKeyAlgorithm
25465-
crypto/package[SO] @deprecated("use dom.RsaKeyGenParams instead", "2.0.0") val RsaKeyGenParams = dom.RsaKeyGenParams
25466-
crypto/package[SO] @deprecated("use dom.RsaOaepParams instead", "2.0.0") val RsaOaepParams = dom.RsaOaepParams
25467-
crypto/package[SO] @deprecated("use dom.RsaPssParams instead", "2.0.0") val RsaPssParams = dom.RsaPssParams
25468-
crypto/package[SO] def crypto: Crypto (@deprecated in 2.0.0)
25387+
crypto[SO] type AesCbcParams = dom.AesCbcParams (@deprecated in 2.0.0)
25388+
crypto[SO] type AesCfbParams = dom.AesCfbParams (@deprecated in 2.0.0)
25389+
crypto[SO] type AesCmacParams = dom.AesCmacParams (@deprecated in 2.0.0)
25390+
crypto[SO] type AesCtrParams = dom.AesCtrParams (@deprecated in 2.0.0)
25391+
crypto[SO] type AesDerivedKeyParams = dom.AesDerivedKeyParams (@deprecated in 2.0.0)
25392+
crypto[SO] type AesGcmParams = dom.AesGcmParams (@deprecated in 2.0.0)
25393+
crypto[SO] type AesKeyAlgorithm = dom.AesKeyAlgorithm (@deprecated in 2.0.0)
25394+
crypto[SO] type AesKeyGenParams = dom.AesKeyGenParams (@deprecated in 2.0.0)
25395+
crypto[SO] type Algorithm = dom.Algorithm (@deprecated in 2.0.0)
25396+
crypto[SO] type AlgorithmIdentifier = dom.AlgorithmIdentifier (@deprecated in 2.0.0)
25397+
crypto[SO] type BigInteger = dom.BigInteger (@deprecated in 2.0.0)
25398+
crypto[SO] type ConcatParams = dom.ConcatParams (@deprecated in 2.0.0)
25399+
crypto[SO] type Crypto = dom.Crypto (@deprecated in 2.0.0)
25400+
crypto[SO] type CryptoKey = dom.CryptoKey (@deprecated in 2.0.0)
25401+
crypto[SO] type CryptoKeyPair = dom.CryptoKeyPair (@deprecated in 2.0.0)
25402+
crypto[SO] type DhImportKeyParams = dom.DhImportKeyParams (@deprecated in 2.0.0)
25403+
crypto[SO] type DhKeyAlgorithm = dom.DhKeyAlgorithm (@deprecated in 2.0.0)
25404+
crypto[SO] type DhKeyDeriveParams = dom.DhKeyDeriveParams (@deprecated in 2.0.0)
25405+
crypto[SO] type DhKeyGenParams = dom.DhKeyGenParams (@deprecated in 2.0.0)
25406+
crypto[SO] type EcKeyAlgorithm = dom.EcKeyAlgorithm (@deprecated in 2.0.0)
25407+
crypto[SO] type EcKeyGenParams = dom.EcKeyGenParams (@deprecated in 2.0.0)
25408+
crypto[SO] type EcKeyImportParams = dom.EcKeyImportParams (@deprecated in 2.0.0)
25409+
crypto[SO] type EcdhKeyDeriveParams = dom.EcdhKeyDeriveParams (@deprecated in 2.0.0)
25410+
crypto[SO] type EcdsaParams = dom.EcdsaParams (@deprecated in 2.0.0)
25411+
crypto[SO] type HashAlgorithm = dom.HashAlgorithm (@deprecated in 2.0.0)
25412+
crypto[SO] type HashAlgorithmIdentifier = dom.HashAlgorithmIdentifier (@deprecated in 2.0.0)
25413+
crypto[SO] type HkdfCtrParams = dom.HkdfCtrParams (@deprecated in 2.0.0)
25414+
crypto[SO] type HmacImportParams = dom.HmacImportParams (@deprecated in 2.0.0)
25415+
crypto[SO] type HmacKeyAlgorithm = dom.HmacKeyAlgorithm (@deprecated in 2.0.0)
25416+
crypto[SO] type HmacKeyGenParams = dom.HmacKeyGenParams (@deprecated in 2.0.0)
25417+
crypto[SO] type JsonWebKey = dom.JsonWebKey (@deprecated in 2.0.0)
25418+
crypto[SO] type KeyAlgorithm = dom.KeyAlgorithm (@deprecated in 2.0.0)
25419+
crypto[SO] type KeyAlgorithmIdentifier = dom.KeyAlgorithmIdentifier (@deprecated in 2.0.0)
25420+
crypto[SO] type KeyFormat = dom.KeyFormat (@deprecated in 2.0.0)
25421+
crypto[SO] type KeyType = dom.KeyType (@deprecated in 2.0.0)
25422+
crypto[SO] type KeyUsage = dom.KeyUsage (@deprecated in 2.0.0)
25423+
crypto[SO] type Pbkdf2Params = dom.Pbkdf2Params (@deprecated in 2.0.0)
25424+
crypto[SO] type RsaHashedImportParams = dom.RsaHashedImportParams (@deprecated in 2.0.0)
25425+
crypto[SO] type RsaHashedKeyAlgorithm = dom.RsaHashedKeyAlgorithm (@deprecated in 2.0.0)
25426+
crypto[SO] type RsaHashedKeyGenParams = dom.RsaHashedKeyGenParams (@deprecated in 2.0.0)
25427+
crypto[SO] type RsaKeyAlgorithm = dom.RsaKeyAlgorithm (@deprecated in 2.0.0)
25428+
crypto[SO] type RsaKeyGenParams = dom.RsaKeyGenParams (@deprecated in 2.0.0)
25429+
crypto[SO] type RsaOaepParams = dom.RsaOaepParams (@deprecated in 2.0.0)
25430+
crypto[SO] type RsaOtherPrimesInfo = dom.RsaOtherPrimesInfo (@deprecated in 2.0.0)
25431+
crypto[SO] type RsaPssParams = dom.RsaPssParams (@deprecated in 2.0.0)
25432+
crypto[SO] type SubtleCrypto = dom.SubtleCrypto (@deprecated in 2.0.0)
25433+
crypto[SO] @deprecated("use dom.AesCbcParams instead", "2.0.0") val AesCbcParams = dom.AesCbcParams
25434+
crypto[SO] @deprecated("use dom.AesCfbParams instead", "2.0.0") val AesCfbParams = dom.AesCfbParams
25435+
crypto[SO] @deprecated("use dom.AesCmacParams instead", "2.0.0") val AesCmacParams = dom.AesCmacParams
25436+
crypto[SO] @deprecated("use dom.AesCtrParams instead", "2.0.0") val AesCtrParams = dom.AesCtrParams
25437+
crypto[SO] @deprecated("use dom.AesDerivedKeyParams instead", "2.0.0") val AesDerivedKeyParams = dom.AesDerivedKeyParams
25438+
crypto[SO] @deprecated("use dom.AesGcmParams instead", "2.0.0") val AesGcmParams = dom.AesGcmParams
25439+
crypto[SO] @deprecated("use dom.AesKeyAlgorithm instead", "2.0.0") val AesKeyAlgorithm = dom.AesKeyAlgorithm
25440+
crypto[SO] @deprecated("use dom.AesKeyGenParams instead", "2.0.0") val AesKeyGenParams = dom.AesKeyGenParams
25441+
crypto[SO] @deprecated("use dom.ConcatParams instead", "2.0.0") val ConcatParams = dom.ConcatParams
25442+
crypto[SO] @deprecated("use dom.DhImportKeyParams instead", "2.0.0") val DhImportKeyParams = dom.DhImportKeyParams
25443+
crypto[SO] @deprecated("use dom.DhKeyAlgorithm instead", "2.0.0") val DhKeyAlgorithm = dom.DhKeyAlgorithm
25444+
crypto[SO] @deprecated("use dom.DhKeyDeriveParams instead", "2.0.0") val DhKeyDeriveParams = dom.DhKeyDeriveParams
25445+
crypto[SO] @deprecated("use dom.DhKeyGenParams instead", "2.0.0") val DhKeyGenParams = dom.DhKeyGenParams
25446+
crypto[SO] @deprecated("use dom.EcKeyAlgorithm instead", "2.0.0") val EcKeyAlgorithm = dom.EcKeyAlgorithm
25447+
crypto[SO] @deprecated("use dom.EcKeyGenParams instead", "2.0.0") val EcKeyGenParams = dom.EcKeyGenParams
25448+
crypto[SO] @deprecated("use dom.EcKeyImportParams instead", "2.0.0") val EcKeyImportParams = dom.EcKeyImportParams
25449+
crypto[SO] @deprecated("use dom.EcdhKeyDeriveParams instead", "2.0.0") val EcdhKeyDeriveParams = dom.EcdhKeyDeriveParams
25450+
crypto[SO] @deprecated("use dom.EcdsaParams instead", "2.0.0") val EcdsaParams = dom.EcdsaParams
25451+
crypto[SO] @deprecated("use dom.HashAlgorithm instead", "2.0.0") val HashAlgorithm = dom.HashAlgorithm
25452+
crypto[SO] @deprecated("use dom.HkdfCtrParams instead", "2.0.0") val HkdfCtrParams = dom.HkdfCtrParams
25453+
crypto[SO] @deprecated("use dom.HmacImportParams instead", "2.0.0") val HmacImportParams = dom.HmacImportParams
25454+
crypto[SO] @deprecated("use dom.HmacKeyAlgorithm instead", "2.0.0") val HmacKeyAlgorithm = dom.HmacKeyAlgorithm
25455+
crypto[SO] @deprecated("use dom.HmacKeyGenParams instead", "2.0.0") val HmacKeyGenParams = dom.HmacKeyGenParams
25456+
crypto[SO] @deprecated("use dom.KeyFormat instead", "2.0.0") val KeyFormat = dom.KeyFormat
25457+
crypto[SO] @deprecated("use dom.KeyType instead", "2.0.0") val KeyType = dom.KeyType
25458+
crypto[SO] @deprecated("use dom.KeyUsage instead", "2.0.0") val KeyUsage = dom.KeyUsage
25459+
crypto[SO] @deprecated("use dom.Pbkdf2Params instead", "2.0.0") val Pbkdf2Params = dom.Pbkdf2Params
25460+
crypto[SO] @deprecated("use dom.RsaHashedImportParams instead", "2.0.0") val RsaHashedImportParams = dom.RsaHashedImportParams
25461+
crypto[SO] @deprecated("use dom.RsaHashedKeyAlgorithm instead", "2.0.0") val RsaHashedKeyAlgorithm = dom.RsaHashedKeyAlgorithm
25462+
crypto[SO] @deprecated("use dom.RsaHashedKeyGenParams instead", "2.0.0") val RsaHashedKeyGenParams = dom.RsaHashedKeyGenParams
25463+
crypto[SO] @deprecated("use dom.RsaKeyAlgorithm instead", "2.0.0") val RsaKeyAlgorithm = dom.RsaKeyAlgorithm
25464+
crypto[SO] @deprecated("use dom.RsaKeyGenParams instead", "2.0.0") val RsaKeyGenParams = dom.RsaKeyGenParams
25465+
crypto[SO] @deprecated("use dom.RsaOaepParams instead", "2.0.0") val RsaOaepParams = dom.RsaOaepParams
25466+
crypto[SO] @deprecated("use dom.RsaPssParams instead", "2.0.0") val RsaPssParams = dom.RsaPssParams
25467+
crypto[SO] def crypto: Crypto (@deprecated in 2.0.0)
25468+
crypto[SO] val crypto: Crypto
25469+
crypto[SO] @JSGlobal("crypto.subtle") @js.native def getRandomValues(array: ArrayBufferView): ArrayBufferView
25470+
crypto[SO] @JSGlobal("crypto.subtle") @js.native val subtle: dom.SubtleCrypto
25471+
crypto.GlobalCrypto[JO] val crypto: Crypto (@deprecated in 2.0.0)
2546925472
experimental/Fullscreen[SO] (@deprecated in 2.0.0)
2547025473
experimental/PointerLock[SO] type PointerLockDocument = dom.Document (@deprecated in 2.0.0)
2547125474
experimental/PointerLock[SO] type PointerLockElement = dom.Element (@deprecated in 2.0.0)
@@ -25938,7 +25941,6 @@ package[SO] @js.native @JSGlobal("console") val console: Console
2593825941
package[SO] lazy val css: DeprecatedCSSAliases.type (@deprecated in 2.0.0)
2593925942
package[SO] @js.native @JSGlobal("document") val document: html.Document
2594025943
package[SO] @js.native @JSGlobal("fetch") def fetch(info: RequestInfo, init: RequestInit = null): js.Promise[Response]
25941-
package[SO] @js.native @JSGlobal("crypto") def webCrypto: Crypto
2594225944
package[SO] @js.native @JSGlobal("window") val window: Window
2594325945
raw[SO] type AbstractWorker = dom.AbstractWorker (@deprecated in 2.0.0)
2594425946
raw[SO] type AnalyserNode = dom.AnalyserNode (@deprecated in 2.0.0)

0 commit comments

Comments
 (0)