@@ -4,6 +4,8 @@ import scala.scalajs.js
4
4
import scala .scalajs .js .annotation ._
5
5
import scala .scalajs .js .typedarray .ArrayBufferView
6
6
7
+ import org .scalajs .dom .BufferSource
8
+
7
9
@ deprecated(" use dom.crypto.crypto instead" , " 2.0.0" )
8
10
@ js.native
9
11
@ JSGlobalScope
@@ -464,7 +466,9 @@ trait RsaOaepParams extends Algorithm {
464
466
object RsaOaepParams {
465
467
@ inline
466
468
def apply (name : String , label : BufferSource ): RsaOaepParams = {
467
- js.Dynamic .literal(name = name, label = label).asInstanceOf [RsaOaepParams ]
469
+ js.Dynamic
470
+ .literal(name = name, label = label.asInstanceOf [js.Any ])
471
+ .asInstanceOf [RsaOaepParams ]
468
472
}
469
473
}
470
474
@@ -556,7 +560,8 @@ object AesCtrParams {
556
560
def apply (name : String , counter : BufferSource ,
557
561
length : Short ): AesCtrParams = {
558
562
js.Dynamic
559
- .literal(name = name, counter = counter, length = length)
563
+ .literal(name = name, counter = counter.asInstanceOf [js.Any ],
564
+ length = length)
560
565
.asInstanceOf [AesCtrParams ]
561
566
}
562
567
}
@@ -612,8 +617,11 @@ trait AesCbcParams extends Algorithm {
612
617
613
618
object AesCbcParams {
614
619
@ inline
615
- def apply (name : String , iv : BufferSource ): AesCbcParams =
616
- js.Dynamic .literal(name = name, iv = iv).asInstanceOf [AesCbcParams ]
620
+ def apply (name : String , iv : BufferSource ): AesCbcParams = {
621
+ js.Dynamic
622
+ .literal(name = name, iv = iv.asInstanceOf [js.Any ])
623
+ .asInstanceOf [AesCbcParams ]
624
+ }
617
625
}
618
626
619
627
// AES-CMAC
@@ -648,7 +656,8 @@ object AesGcmParams {
648
656
def apply (name : String , iv : BufferSource , additionalData : BufferSource ,
649
657
tagLength : Short ): AesGcmParams = {
650
658
js.Dynamic
651
- .literal(name = name, iv = iv, additionalData = additionalData,
659
+ .literal(name = name, iv = iv.asInstanceOf [js.Any ],
660
+ additionalData = additionalData.asInstanceOf [js.Any ],
652
661
tagLength = tagLength)
653
662
.asInstanceOf [AesGcmParams ]
654
663
}
@@ -664,7 +673,9 @@ trait AesCfbParams extends Algorithm {
664
673
object AesCfbParams {
665
674
@ inline
666
675
def apply (name : String , iv : BufferSource ): AesCfbParams =
667
- js.Dynamic .literal(name = name, iv = iv).asInstanceOf [AesCfbParams ]
676
+ js.Dynamic
677
+ .literal(name = name, iv = iv.asInstanceOf [js.Any ])
678
+ .asInstanceOf [AesCfbParams ]
668
679
}
669
680
670
681
// AES-KW
@@ -817,9 +828,11 @@ object ConcatParams {
817
828
privateInfo : BufferSource ): ConcatParams = {
818
829
js.Dynamic
819
830
.literal(name = name, hash = hash.asInstanceOf [js.Any ],
820
- algorithmId = algorithmId, partyUInfo = partyUInfo,
821
- partyVInfo = partyVInfo, publicInfo = publicInfo,
822
- privateInfo = privateInfo)
831
+ algorithmId = algorithmId.asInstanceOf [js.Any ],
832
+ partyUInfo = partyUInfo.asInstanceOf [js.Any ],
833
+ partyVInfo = partyVInfo.asInstanceOf [js.Any ],
834
+ publicInfo = publicInfo.asInstanceOf [js.Any ],
835
+ privateInfo = privateInfo.asInstanceOf [js.Any ])
823
836
.asInstanceOf [ConcatParams ]
824
837
}
825
838
}
@@ -840,8 +853,9 @@ object HkdfCtrParams {
840
853
def apply (name : String , hash : HashAlgorithmIdentifier , label : BufferSource ,
841
854
context : BufferSource ): HkdfCtrParams = {
842
855
js.Dynamic
843
- .literal(name = name, hash = hash.asInstanceOf [js.Any ], label = label,
844
- context = context)
856
+ .literal(name = name, hash = hash.asInstanceOf [js.Any ],
857
+ label = label.asInstanceOf [js.Any ],
858
+ context = context.asInstanceOf [js.Any ])
845
859
.asInstanceOf [HkdfCtrParams ]
846
860
}
847
861
}
@@ -862,8 +876,8 @@ object Pbkdf2Params {
862
876
def apply (name : String , salt : BufferSource , iterations : Long ,
863
877
hash : HashAlgorithmIdentifier ): Pbkdf2Params = {
864
878
js.Dynamic
865
- .literal(name = name, salt = salt, iterations = iterations.toDouble ,
866
- hash = hash.asInstanceOf [js.Any ])
879
+ .literal(name = name, salt = salt. asInstanceOf [js. Any ] ,
880
+ iterations = iterations.toDouble, hash = hash.asInstanceOf [js.Any ])
867
881
.asInstanceOf [Pbkdf2Params ]
868
882
}
869
883
}
0 commit comments