-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathto_dafny.go
1789 lines (1480 loc) · 59.6 KB
/
to_dafny.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by smithy-go-codegen DO NOT EDIT.
package awscryptographyprimitivessmithygenerated
import (
"github.com/aws/aws-cryptographic-material-providers-library/primitives/AwsCryptographyPrimitivesTypes"
"github.com/aws/aws-cryptographic-material-providers-library/primitives/awscryptographyprimitivessmithygeneratedtypes"
"github.com/dafny-lang/DafnyRuntimeGo/v4/dafny"
"github.com/dafny-lang/DafnyStandardLibGo/Wrappers"
)
func AESDecryptInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.AESDecryptInput) AwsCryptographyPrimitivesTypes.AESDecryptInput {
return func() AwsCryptographyPrimitivesTypes.AESDecryptInput {
return AwsCryptographyPrimitivesTypes.Companion_AESDecryptInput_.Create_AESDecryptInput_(aws_cryptography_primitives_AESDecryptInput_encAlg_ToDafny(nativeInput.EncAlg), aws_cryptography_primitives_AESDecryptInput_key_ToDafny(nativeInput.Key), aws_cryptography_primitives_AESDecryptInput_cipherTxt_ToDafny(nativeInput.CipherTxt), aws_cryptography_primitives_AESDecryptInput_authTag_ToDafny(nativeInput.AuthTag), aws_cryptography_primitives_AESDecryptInput_iv_ToDafny(nativeInput.Iv), aws_cryptography_primitives_AESDecryptInput_aad_ToDafny(nativeInput.Aad))
}()
}
func AESEncryptInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.AESEncryptInput) AwsCryptographyPrimitivesTypes.AESEncryptInput {
return func() AwsCryptographyPrimitivesTypes.AESEncryptInput {
return AwsCryptographyPrimitivesTypes.Companion_AESEncryptInput_.Create_AESEncryptInput_(aws_cryptography_primitives_AESEncryptInput_encAlg_ToDafny(nativeInput.EncAlg), aws_cryptography_primitives_AESEncryptInput_iv_ToDafny(nativeInput.Iv), aws_cryptography_primitives_AESEncryptInput_key_ToDafny(nativeInput.Key), aws_cryptography_primitives_AESEncryptInput_msg_ToDafny(nativeInput.Msg), aws_cryptography_primitives_AESEncryptInput_aad_ToDafny(nativeInput.Aad))
}()
}
func AESEncryptOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.AESEncryptOutput) AwsCryptographyPrimitivesTypes.AESEncryptOutput {
return func() AwsCryptographyPrimitivesTypes.AESEncryptOutput {
return AwsCryptographyPrimitivesTypes.Companion_AESEncryptOutput_.Create_AESEncryptOutput_(aws_cryptography_primitives_AESEncryptOutput_cipherText_ToDafny(nativeOutput.CipherText), aws_cryptography_primitives_AESEncryptOutput_authTag_ToDafny(nativeOutput.AuthTag))
}()
}
func AesKdfCtrInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.AesKdfCtrInput) AwsCryptographyPrimitivesTypes.AesKdfCtrInput {
return func() AwsCryptographyPrimitivesTypes.AesKdfCtrInput {
return AwsCryptographyPrimitivesTypes.Companion_AesKdfCtrInput_.Create_AesKdfCtrInput_(aws_cryptography_primitives_AesKdfCtrInput_ikm_ToDafny(nativeInput.Ikm), aws_cryptography_primitives_AesKdfCtrInput_expectedLength_ToDafny(nativeInput.ExpectedLength), aws_cryptography_primitives_AesKdfCtrInput_nonce_ToDafny(nativeInput.Nonce))
}()
}
func CompressPublicKeyInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.CompressPublicKeyInput) AwsCryptographyPrimitivesTypes.CompressPublicKeyInput {
return func() AwsCryptographyPrimitivesTypes.CompressPublicKeyInput {
return AwsCryptographyPrimitivesTypes.Companion_CompressPublicKeyInput_.Create_CompressPublicKeyInput_(aws_cryptography_primitives_CompressPublicKeyInput_publicKey_ToDafny(nativeInput.PublicKey), aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_ToDafny(nativeInput.EccCurve))
}()
}
func CompressPublicKeyOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.CompressPublicKeyOutput) AwsCryptographyPrimitivesTypes.CompressPublicKeyOutput {
return func() AwsCryptographyPrimitivesTypes.CompressPublicKeyOutput {
return AwsCryptographyPrimitivesTypes.Companion_CompressPublicKeyOutput_.Create_CompressPublicKeyOutput_(aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_ToDafny(nativeOutput.CompressedPublicKey))
}()
}
func DecompressPublicKeyInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.DecompressPublicKeyInput) AwsCryptographyPrimitivesTypes.DecompressPublicKeyInput {
return func() AwsCryptographyPrimitivesTypes.DecompressPublicKeyInput {
return AwsCryptographyPrimitivesTypes.Companion_DecompressPublicKeyInput_.Create_DecompressPublicKeyInput_(aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_ToDafny(nativeInput.CompressedPublicKey), aws_cryptography_primitives_DecompressPublicKeyInput_eccCurve_ToDafny(nativeInput.EccCurve))
}()
}
func DecompressPublicKeyOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.DecompressPublicKeyOutput) AwsCryptographyPrimitivesTypes.DecompressPublicKeyOutput {
return func() AwsCryptographyPrimitivesTypes.DecompressPublicKeyOutput {
return AwsCryptographyPrimitivesTypes.Companion_DecompressPublicKeyOutput_.Create_DecompressPublicKeyOutput_(aws_cryptography_primitives_DecompressPublicKeyOutput_publicKey_ToDafny(nativeOutput.PublicKey))
}()
}
func DeriveSharedSecretInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.DeriveSharedSecretInput) AwsCryptographyPrimitivesTypes.DeriveSharedSecretInput {
return func() AwsCryptographyPrimitivesTypes.DeriveSharedSecretInput {
return AwsCryptographyPrimitivesTypes.Companion_DeriveSharedSecretInput_.Create_DeriveSharedSecretInput_(aws_cryptography_primitives_DeriveSharedSecretInput_eccCurve_ToDafny(nativeInput.EccCurve), aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_ToDafny(nativeInput.PrivateKey), aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_ToDafny(nativeInput.PublicKey))
}()
}
func DeriveSharedSecretOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.DeriveSharedSecretOutput) AwsCryptographyPrimitivesTypes.DeriveSharedSecretOutput {
return func() AwsCryptographyPrimitivesTypes.DeriveSharedSecretOutput {
return AwsCryptographyPrimitivesTypes.Companion_DeriveSharedSecretOutput_.Create_DeriveSharedSecretOutput_(aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_ToDafny(nativeOutput.SharedSecret))
}()
}
func DigestInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.DigestInput) AwsCryptographyPrimitivesTypes.DigestInput {
return func() AwsCryptographyPrimitivesTypes.DigestInput {
return AwsCryptographyPrimitivesTypes.Companion_DigestInput_.Create_DigestInput_(aws_cryptography_primitives_DigestInput_digestAlgorithm_ToDafny(nativeInput.DigestAlgorithm), aws_cryptography_primitives_DigestInput_message_ToDafny(nativeInput.Message))
}()
}
func ECDSASignInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.ECDSASignInput) AwsCryptographyPrimitivesTypes.ECDSASignInput {
return func() AwsCryptographyPrimitivesTypes.ECDSASignInput {
return AwsCryptographyPrimitivesTypes.Companion_ECDSASignInput_.Create_ECDSASignInput_(aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_ToDafny(nativeInput.SignatureAlgorithm), aws_cryptography_primitives_ECDSASignInput_signingKey_ToDafny(nativeInput.SigningKey), aws_cryptography_primitives_ECDSASignInput_message_ToDafny(nativeInput.Message))
}()
}
func ECDSAVerifyInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.ECDSAVerifyInput) AwsCryptographyPrimitivesTypes.ECDSAVerifyInput {
return func() AwsCryptographyPrimitivesTypes.ECDSAVerifyInput {
return AwsCryptographyPrimitivesTypes.Companion_ECDSAVerifyInput_.Create_ECDSAVerifyInput_(aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_ToDafny(nativeInput.SignatureAlgorithm), aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_ToDafny(nativeInput.VerificationKey), aws_cryptography_primitives_ECDSAVerifyInput_message_ToDafny(nativeInput.Message), aws_cryptography_primitives_ECDSAVerifyInput_signature_ToDafny(nativeInput.Signature))
}()
}
func GenerateECCKeyPairInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.GenerateECCKeyPairInput) AwsCryptographyPrimitivesTypes.GenerateECCKeyPairInput {
return func() AwsCryptographyPrimitivesTypes.GenerateECCKeyPairInput {
return AwsCryptographyPrimitivesTypes.Companion_GenerateECCKeyPairInput_.Create_GenerateECCKeyPairInput_(aws_cryptography_primitives_GenerateECCKeyPairInput_eccCurve_ToDafny(nativeInput.EccCurve))
}()
}
func GenerateECCKeyPairOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.GenerateECCKeyPairOutput) AwsCryptographyPrimitivesTypes.GenerateECCKeyPairOutput {
return func() AwsCryptographyPrimitivesTypes.GenerateECCKeyPairOutput {
return AwsCryptographyPrimitivesTypes.Companion_GenerateECCKeyPairOutput_.Create_GenerateECCKeyPairOutput_(aws_cryptography_primitives_GenerateECCKeyPairOutput_eccCurve_ToDafny(nativeOutput.EccCurve), aws_cryptography_primitives_GenerateECCKeyPairOutput_privateKey_ToDafny(nativeOutput.PrivateKey), aws_cryptography_primitives_GenerateECCKeyPairOutput_publicKey_ToDafny(nativeOutput.PublicKey))
}()
}
func GenerateECDSASignatureKeyInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.GenerateECDSASignatureKeyInput) AwsCryptographyPrimitivesTypes.GenerateECDSASignatureKeyInput {
return func() AwsCryptographyPrimitivesTypes.GenerateECDSASignatureKeyInput {
return AwsCryptographyPrimitivesTypes.Companion_GenerateECDSASignatureKeyInput_.Create_GenerateECDSASignatureKeyInput_(aws_cryptography_primitives_GenerateECDSASignatureKeyInput_signatureAlgorithm_ToDafny(nativeInput.SignatureAlgorithm))
}()
}
func GenerateECDSASignatureKeyOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.GenerateECDSASignatureKeyOutput) AwsCryptographyPrimitivesTypes.GenerateECDSASignatureKeyOutput {
return func() AwsCryptographyPrimitivesTypes.GenerateECDSASignatureKeyOutput {
return AwsCryptographyPrimitivesTypes.Companion_GenerateECDSASignatureKeyOutput_.Create_GenerateECDSASignatureKeyOutput_(aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgorithm_ToDafny(nativeOutput.SignatureAlgorithm), aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_ToDafny(nativeOutput.VerificationKey), aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_ToDafny(nativeOutput.SigningKey))
}()
}
func GenerateRandomBytesInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.GenerateRandomBytesInput) AwsCryptographyPrimitivesTypes.GenerateRandomBytesInput {
return func() AwsCryptographyPrimitivesTypes.GenerateRandomBytesInput {
return AwsCryptographyPrimitivesTypes.Companion_GenerateRandomBytesInput_.Create_GenerateRandomBytesInput_(aws_cryptography_primitives_GenerateRandomBytesInput_length_ToDafny(nativeInput.Length))
}()
}
func GenerateRSAKeyPairInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.GenerateRSAKeyPairInput) AwsCryptographyPrimitivesTypes.GenerateRSAKeyPairInput {
return func() AwsCryptographyPrimitivesTypes.GenerateRSAKeyPairInput {
return AwsCryptographyPrimitivesTypes.Companion_GenerateRSAKeyPairInput_.Create_GenerateRSAKeyPairInput_(aws_cryptography_primitives_GenerateRSAKeyPairInput_lengthBits_ToDafny(nativeInput.LengthBits))
}()
}
func GenerateRSAKeyPairOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.GenerateRSAKeyPairOutput) AwsCryptographyPrimitivesTypes.GenerateRSAKeyPairOutput {
return func() AwsCryptographyPrimitivesTypes.GenerateRSAKeyPairOutput {
return AwsCryptographyPrimitivesTypes.Companion_GenerateRSAKeyPairOutput_.Create_GenerateRSAKeyPairOutput_(aws_cryptography_primitives_GenerateRSAKeyPairOutput_publicKey_ToDafny(nativeOutput.PublicKey), aws_cryptography_primitives_GenerateRSAKeyPairOutput_privateKey_ToDafny(nativeOutput.PrivateKey))
}()
}
func GetPublicKeyFromPrivateKeyInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.GetPublicKeyFromPrivateKeyInput) AwsCryptographyPrimitivesTypes.GetPublicKeyFromPrivateKeyInput {
return func() AwsCryptographyPrimitivesTypes.GetPublicKeyFromPrivateKeyInput {
return AwsCryptographyPrimitivesTypes.Companion_GetPublicKeyFromPrivateKeyInput_.Create_GetPublicKeyFromPrivateKeyInput_(aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_eccCurve_ToDafny(nativeInput.EccCurve), aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_privateKey_ToDafny(nativeInput.PrivateKey))
}()
}
func GetPublicKeyFromPrivateKeyOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.GetPublicKeyFromPrivateKeyOutput) AwsCryptographyPrimitivesTypes.GetPublicKeyFromPrivateKeyOutput {
return func() AwsCryptographyPrimitivesTypes.GetPublicKeyFromPrivateKeyOutput {
return AwsCryptographyPrimitivesTypes.Companion_GetPublicKeyFromPrivateKeyOutput_.Create_GetPublicKeyFromPrivateKeyOutput_(aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_eccCurve_ToDafny(nativeOutput.EccCurve), aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_ToDafny(nativeOutput.PrivateKey), aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_ToDafny(nativeOutput.PublicKey))
}()
}
func GetRSAKeyModulusLengthInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.GetRSAKeyModulusLengthInput) AwsCryptographyPrimitivesTypes.GetRSAKeyModulusLengthInput {
return func() AwsCryptographyPrimitivesTypes.GetRSAKeyModulusLengthInput {
return AwsCryptographyPrimitivesTypes.Companion_GetRSAKeyModulusLengthInput_.Create_GetRSAKeyModulusLengthInput_(aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_ToDafny(nativeInput.PublicKey))
}()
}
func GetRSAKeyModulusLengthOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.GetRSAKeyModulusLengthOutput) AwsCryptographyPrimitivesTypes.GetRSAKeyModulusLengthOutput {
return func() AwsCryptographyPrimitivesTypes.GetRSAKeyModulusLengthOutput {
return AwsCryptographyPrimitivesTypes.Companion_GetRSAKeyModulusLengthOutput_.Create_GetRSAKeyModulusLengthOutput_(aws_cryptography_primitives_GetRSAKeyModulusLengthOutput_length_ToDafny(nativeOutput.Length))
}()
}
func HkdfInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.HkdfInput) AwsCryptographyPrimitivesTypes.HkdfInput {
return func() AwsCryptographyPrimitivesTypes.HkdfInput {
return AwsCryptographyPrimitivesTypes.Companion_HkdfInput_.Create_HkdfInput_(aws_cryptography_primitives_HkdfInput_digestAlgorithm_ToDafny(nativeInput.DigestAlgorithm), aws_cryptography_primitives_HkdfInput_salt_ToDafny(nativeInput.Salt), aws_cryptography_primitives_HkdfInput_ikm_ToDafny(nativeInput.Ikm), aws_cryptography_primitives_HkdfInput_info_ToDafny(nativeInput.Info), aws_cryptography_primitives_HkdfInput_expectedLength_ToDafny(nativeInput.ExpectedLength))
}()
}
func HkdfExpandInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.HkdfExpandInput) AwsCryptographyPrimitivesTypes.HkdfExpandInput {
return func() AwsCryptographyPrimitivesTypes.HkdfExpandInput {
return AwsCryptographyPrimitivesTypes.Companion_HkdfExpandInput_.Create_HkdfExpandInput_(aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_ToDafny(nativeInput.DigestAlgorithm), aws_cryptography_primitives_HkdfExpandInput_prk_ToDafny(nativeInput.Prk), aws_cryptography_primitives_HkdfExpandInput_info_ToDafny(nativeInput.Info), aws_cryptography_primitives_HkdfExpandInput_expectedLength_ToDafny(nativeInput.ExpectedLength))
}()
}
func HkdfExtractInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.HkdfExtractInput) AwsCryptographyPrimitivesTypes.HkdfExtractInput {
return func() AwsCryptographyPrimitivesTypes.HkdfExtractInput {
return AwsCryptographyPrimitivesTypes.Companion_HkdfExtractInput_.Create_HkdfExtractInput_(aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_ToDafny(nativeInput.DigestAlgorithm), aws_cryptography_primitives_HkdfExtractInput_salt_ToDafny(nativeInput.Salt), aws_cryptography_primitives_HkdfExtractInput_ikm_ToDafny(nativeInput.Ikm))
}()
}
func HMacInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.HMacInput) AwsCryptographyPrimitivesTypes.HMacInput {
return func() AwsCryptographyPrimitivesTypes.HMacInput {
return AwsCryptographyPrimitivesTypes.Companion_HMacInput_.Create_HMacInput_(aws_cryptography_primitives_HMacInput_digestAlgorithm_ToDafny(nativeInput.DigestAlgorithm), aws_cryptography_primitives_HMacInput_key_ToDafny(nativeInput.Key), aws_cryptography_primitives_HMacInput_message_ToDafny(nativeInput.Message))
}()
}
func KdfCtrInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.KdfCtrInput) AwsCryptographyPrimitivesTypes.KdfCtrInput {
return func() AwsCryptographyPrimitivesTypes.KdfCtrInput {
return AwsCryptographyPrimitivesTypes.Companion_KdfCtrInput_.Create_KdfCtrInput_(aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_ToDafny(nativeInput.DigestAlgorithm), aws_cryptography_primitives_KdfCtrInput_ikm_ToDafny(nativeInput.Ikm), aws_cryptography_primitives_KdfCtrInput_expectedLength_ToDafny(nativeInput.ExpectedLength), aws_cryptography_primitives_KdfCtrInput_purpose_ToDafny(nativeInput.Purpose), aws_cryptography_primitives_KdfCtrInput_nonce_ToDafny(nativeInput.Nonce))
}()
}
func ParsePublicKeyInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.ParsePublicKeyInput) AwsCryptographyPrimitivesTypes.ParsePublicKeyInput {
return func() AwsCryptographyPrimitivesTypes.ParsePublicKeyInput {
return AwsCryptographyPrimitivesTypes.Companion_ParsePublicKeyInput_.Create_ParsePublicKeyInput_(aws_cryptography_primitives_ParsePublicKeyInput_publicKey_ToDafny(nativeInput.PublicKey))
}()
}
func ParsePublicKeyOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.ParsePublicKeyOutput) AwsCryptographyPrimitivesTypes.ParsePublicKeyOutput {
return func() AwsCryptographyPrimitivesTypes.ParsePublicKeyOutput {
return AwsCryptographyPrimitivesTypes.Companion_ParsePublicKeyOutput_.Create_ParsePublicKeyOutput_(aws_cryptography_primitives_ParsePublicKeyOutput_publicKey_ToDafny(nativeOutput.PublicKey))
}()
}
func RSADecryptInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.RSADecryptInput) AwsCryptographyPrimitivesTypes.RSADecryptInput {
return func() AwsCryptographyPrimitivesTypes.RSADecryptInput {
return AwsCryptographyPrimitivesTypes.Companion_RSADecryptInput_.Create_RSADecryptInput_(aws_cryptography_primitives_RSADecryptInput_padding_ToDafny(nativeInput.Padding), aws_cryptography_primitives_RSADecryptInput_privateKey_ToDafny(nativeInput.PrivateKey), aws_cryptography_primitives_RSADecryptInput_cipherText_ToDafny(nativeInput.CipherText))
}()
}
func RSAEncryptInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.RSAEncryptInput) AwsCryptographyPrimitivesTypes.RSAEncryptInput {
return func() AwsCryptographyPrimitivesTypes.RSAEncryptInput {
return AwsCryptographyPrimitivesTypes.Companion_RSAEncryptInput_.Create_RSAEncryptInput_(aws_cryptography_primitives_RSAEncryptInput_padding_ToDafny(nativeInput.Padding), aws_cryptography_primitives_RSAEncryptInput_publicKey_ToDafny(nativeInput.PublicKey), aws_cryptography_primitives_RSAEncryptInput_plaintext_ToDafny(nativeInput.Plaintext))
}()
}
func ValidatePublicKeyInput_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.ValidatePublicKeyInput) AwsCryptographyPrimitivesTypes.ValidatePublicKeyInput {
return func() AwsCryptographyPrimitivesTypes.ValidatePublicKeyInput {
return AwsCryptographyPrimitivesTypes.Companion_ValidatePublicKeyInput_.Create_ValidatePublicKeyInput_(aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_ToDafny(nativeInput.EccCurve), aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_ToDafny(nativeInput.PublicKey))
}()
}
func ValidatePublicKeyOutput_ToDafny(nativeOutput awscryptographyprimitivessmithygeneratedtypes.ValidatePublicKeyOutput) AwsCryptographyPrimitivesTypes.ValidatePublicKeyOutput {
return func() AwsCryptographyPrimitivesTypes.ValidatePublicKeyOutput {
return AwsCryptographyPrimitivesTypes.Companion_ValidatePublicKeyOutput_.Create_ValidatePublicKeyOutput_(aws_cryptography_primitives_ValidatePublicKeyOutput_success_ToDafny(nativeOutput.Success))
}()
}
func AwsCryptographicPrimitivesError_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.AwsCryptographicPrimitivesError) AwsCryptographyPrimitivesTypes.Error {
return func() AwsCryptographyPrimitivesTypes.Error {
return AwsCryptographyPrimitivesTypes.Companion_Error_.Create_AwsCryptographicPrimitivesError_(aws_cryptography_primitives_AwsCryptographicPrimitivesError_message_ToDafny(nativeInput.Message))
}()
}
func CollectionOfErrors_Input_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.CollectionOfErrors) AwsCryptographyPrimitivesTypes.Error {
var e []interface{}
for _, i2 := range nativeInput.ListOfErrors {
e = append(e, Error_ToDafny(i2))
}
return AwsCryptographyPrimitivesTypes.Companion_Error_.Create_CollectionOfErrors_(dafny.SeqOf(e...), dafny.SeqOfChars([]dafny.Char(nativeInput.Message)...))
}
func OpaqueError_Input_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.OpaqueError) AwsCryptographyPrimitivesTypes.Error {
return AwsCryptographyPrimitivesTypes.Companion_Error_.Create_Opaque_(nativeInput.ErrObject)
}
func Error_ToDafny(err error) AwsCryptographyPrimitivesTypes.Error {
switch err.(type) {
// Service Errors
case awscryptographyprimitivessmithygeneratedtypes.AwsCryptographicPrimitivesError:
return AwsCryptographicPrimitivesError_ToDafny(err.(awscryptographyprimitivessmithygeneratedtypes.AwsCryptographicPrimitivesError))
//DependentErrors
//Unmodelled Errors
case awscryptographyprimitivessmithygeneratedtypes.CollectionOfErrors:
return CollectionOfErrors_Input_ToDafny(err.(awscryptographyprimitivessmithygeneratedtypes.CollectionOfErrors))
default:
error, ok := err.(awscryptographyprimitivessmithygeneratedtypes.OpaqueError)
if !ok {
panic("Error is not an OpaqueError")
}
return OpaqueError_Input_ToDafny(error)
}
}
func CryptoConfig_ToDafny(nativeInput awscryptographyprimitivessmithygeneratedtypes.CryptoConfig) AwsCryptographyPrimitivesTypes.CryptoConfig {
return func() AwsCryptographyPrimitivesTypes.CryptoConfig {
return AwsCryptographyPrimitivesTypes.Companion_CryptoConfig_.Create_CryptoConfig_()
}()
}
func aws_cryptography_primitives_AESDecryptInput_encAlg_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.AES_GCM) AwsCryptographyPrimitivesTypes.AES__GCM {
return func() AwsCryptographyPrimitivesTypes.AES__GCM {
return AwsCryptographyPrimitivesTypes.Companion_AES__GCM_.Create_AES__GCM_(aws_cryptography_primitives_AES_GCM_keyLength_ToDafny(input.KeyLength), aws_cryptography_primitives_AES_GCM_tagLength_ToDafny(input.TagLength), aws_cryptography_primitives_AES_GCM_ivLength_ToDafny(input.IvLength))
}()
}
func aws_cryptography_primitives_AES_GCM_keyLength_ToDafny(input int32) int32 {
return func() int32 {
return input
}()
}
func aws_cryptography_primitives_AES_GCM_tagLength_ToDafny(input int32) int32 {
return func() int32 {
return input
}()
}
func aws_cryptography_primitives_AES_GCM_ivLength_ToDafny(input int32) int32 {
return func() int32 {
return input
}()
}
func aws_cryptography_primitives_AESDecryptInput_key_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESDecryptInput_cipherTxt_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESDecryptInput_authTag_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESDecryptInput_iv_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESDecryptInput_aad_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func Aws_cryptography_primitives_AESDecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESEncryptInput_encAlg_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.AES_GCM) AwsCryptographyPrimitivesTypes.AES__GCM {
return func() AwsCryptographyPrimitivesTypes.AES__GCM {
return AwsCryptographyPrimitivesTypes.Companion_AES__GCM_.Create_AES__GCM_(aws_cryptography_primitives_AES_GCM_keyLength_ToDafny(input.KeyLength), aws_cryptography_primitives_AES_GCM_tagLength_ToDafny(input.TagLength), aws_cryptography_primitives_AES_GCM_ivLength_ToDafny(input.IvLength))
}()
}
func aws_cryptography_primitives_AESEncryptInput_iv_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESEncryptInput_key_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESEncryptInput_msg_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESEncryptInput_aad_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AESEncryptOutput_authTag_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AesKdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_AesKdfCtrInput_expectedLength_ToDafny(input int32) int32 {
return func() int32 {
return input
}()
}
func aws_cryptography_primitives_AesKdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option {
return func() Wrappers.Option {
var v []interface{}
if input == nil {
return Wrappers.Companion_Option_.Create_None_()
}
for _, e := range input {
v = append(v, e)
}
return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...))
}()
}
func Aws_cryptography_primitives_AesKdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_CompressPublicKeyInput_publicKey_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey) AwsCryptographyPrimitivesTypes.ECCPublicKey {
return func() AwsCryptographyPrimitivesTypes.ECCPublicKey {
return AwsCryptographyPrimitivesTypes.Companion_ECCPublicKey_.Create_ECCPublicKey_(aws_cryptography_primitives_ECCPublicKey_der_ToDafny(input.Der))
}()
}
func aws_cryptography_primitives_ECCPublicKey_der_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec) AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
return func() AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
var index int
for _, enumVal := range input.Values() {
index++
if enumVal == input {
break
}
}
var enum interface{}
for allEnums, i := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()), 0; i < index; i++ {
var ok bool
enum, ok = allEnums()
if !ok {
break
}
}
return enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec)
}()
}
func aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_DecompressPublicKeyInput_eccCurve_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec) AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
return func() AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
var index int
for _, enumVal := range input.Values() {
index++
if enumVal == input {
break
}
}
var enum interface{}
for allEnums, i := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()), 0; i < index; i++ {
var ok bool
enum, ok = allEnums()
if !ok {
break
}
}
return enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec)
}()
}
func aws_cryptography_primitives_DecompressPublicKeyOutput_publicKey_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey) AwsCryptographyPrimitivesTypes.ECCPublicKey {
return func() AwsCryptographyPrimitivesTypes.ECCPublicKey {
return AwsCryptographyPrimitivesTypes.Companion_ECCPublicKey_.Create_ECCPublicKey_(aws_cryptography_primitives_ECCPublicKey_der_ToDafny(input.Der))
}()
}
func aws_cryptography_primitives_DeriveSharedSecretInput_eccCurve_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec) AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
return func() AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
var index int
for _, enumVal := range input.Values() {
index++
if enumVal == input {
break
}
}
var enum interface{}
for allEnums, i := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()), 0; i < index; i++ {
var ok bool
enum, ok = allEnums()
if !ok {
break
}
}
return enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec)
}()
}
func aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey) AwsCryptographyPrimitivesTypes.ECCPrivateKey {
return func() AwsCryptographyPrimitivesTypes.ECCPrivateKey {
return AwsCryptographyPrimitivesTypes.Companion_ECCPrivateKey_.Create_ECCPrivateKey_(aws_cryptography_primitives_ECCPrivateKey_pem_ToDafny(input.Pem))
}()
}
func aws_cryptography_primitives_ECCPrivateKey_pem_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey) AwsCryptographyPrimitivesTypes.ECCPublicKey {
return func() AwsCryptographyPrimitivesTypes.ECCPublicKey {
return AwsCryptographyPrimitivesTypes.Companion_ECCPublicKey_.Create_ECCPublicKey_(aws_cryptography_primitives_ECCPublicKey_der_ToDafny(input.Der))
}()
}
func aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_DigestInput_digestAlgorithm_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm) AwsCryptographyPrimitivesTypes.DigestAlgorithm {
return func() AwsCryptographyPrimitivesTypes.DigestAlgorithm {
var index int
for _, enumVal := range input.Values() {
index++
if enumVal == input {
break
}
}
var enum interface{}
for allEnums, i := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_DigestAlgorithm_{}.AllSingletonConstructors()), 0; i < index; i++ {
var ok bool
enum, ok = allEnums()
if !ok {
break
}
}
return enum.(AwsCryptographyPrimitivesTypes.DigestAlgorithm)
}()
}
func aws_cryptography_primitives_DigestInput_message_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func Aws_cryptography_primitives_DigestOutput_digest_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm) AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm {
return func() AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm {
var index int
for _, enumVal := range input.Values() {
index++
if enumVal == input {
break
}
}
var enum interface{}
for allEnums, i := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDSASignatureAlgorithm_{}.AllSingletonConstructors()), 0; i < index; i++ {
var ok bool
enum, ok = allEnums()
if !ok {
break
}
}
return enum.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm)
}()
}
func aws_cryptography_primitives_ECDSASignInput_signingKey_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_ECDSASignInput_message_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func Aws_cryptography_primitives_ECDSASignOutput_signature_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm) AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm {
return func() AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm {
var index int
for _, enumVal := range input.Values() {
index++
if enumVal == input {
break
}
}
var enum interface{}
for allEnums, i := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDSASignatureAlgorithm_{}.AllSingletonConstructors()), 0; i < index; i++ {
var ok bool
enum, ok = allEnums()
if !ok {
break
}
}
return enum.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm)
}()
}
func aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_ECDSAVerifyInput_message_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func aws_cryptography_primitives_ECDSAVerifyInput_signature_ToDafny(input []byte) dafny.Sequence {
return func() dafny.Sequence {
var v []interface{}
if input == nil {
return nil
}
for _, e := range input {
v = append(v, e)
}
return dafny.SeqOf(v...)
}()
}
func Aws_cryptography_primitives_ECDSAVerifyOutput_success_ToDafny(input bool) bool {
return func() bool {
return input
}()
}
func aws_cryptography_primitives_GenerateECCKeyPairInput_eccCurve_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec) AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
return func() AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
var index int
for _, enumVal := range input.Values() {
index++
if enumVal == input {
break
}
}
var enum interface{}
for allEnums, i := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()), 0; i < index; i++ {
var ok bool
enum, ok = allEnums()
if !ok {
break
}
}
return enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec)
}()
}
func aws_cryptography_primitives_GenerateECCKeyPairOutput_eccCurve_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec) AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
return func() AwsCryptographyPrimitivesTypes.ECDHCurveSpec {
var index int
for _, enumVal := range input.Values() {
index++
if enumVal == input {
break
}
}
var enum interface{}
for allEnums, i := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()), 0; i < index; i++ {
var ok bool
enum, ok = allEnums()
if !ok {
break
}
}
return enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec)
}()
}
func aws_cryptography_primitives_GenerateECCKeyPairOutput_privateKey_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey) AwsCryptographyPrimitivesTypes.ECCPrivateKey {
return func() AwsCryptographyPrimitivesTypes.ECCPrivateKey {
return AwsCryptographyPrimitivesTypes.Companion_ECCPrivateKey_.Create_ECCPrivateKey_(aws_cryptography_primitives_ECCPrivateKey_pem_ToDafny(input.Pem))
}()
}
func aws_cryptography_primitives_GenerateECCKeyPairOutput_publicKey_ToDafny(input awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey) AwsCryptographyPrimitivesTypes.ECCPublicKey {
return func() AwsCryptographyPrimitivesTypes.ECCPublicKey {