AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go (1,495 lines of code) (raw):

// Code generated by smithy-go-codegen DO NOT EDIT. package awscryptographyprimitivessmithygenerated import ( "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/AwsCryptographyPrimitivesTypes" "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/awscryptographyprimitivessmithygeneratedtypes" "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/UTF8" "github.com/dafny-lang/DafnyRuntimeGo/v4/dafny" ) func AESDecryptInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.AESDecryptInput) awscryptographyprimitivessmithygeneratedtypes.AESDecryptInput { return awscryptographyprimitivessmithygeneratedtypes.AESDecryptInput{EncAlg: Aws_cryptography_primitives_AESDecryptInput_encAlg_FromDafny(dafnyInput.Dtor_encAlg()), Key: Aws_cryptography_primitives_AESDecryptInput_key_FromDafny(dafnyInput.Dtor_key()), CipherTxt: Aws_cryptography_primitives_AESDecryptInput_cipherTxt_FromDafny(dafnyInput.Dtor_cipherTxt()), AuthTag: Aws_cryptography_primitives_AESDecryptInput_authTag_FromDafny(dafnyInput.Dtor_authTag()), Iv: Aws_cryptography_primitives_AESDecryptInput_iv_FromDafny(dafnyInput.Dtor_iv()), Aad: Aws_cryptography_primitives_AESDecryptInput_aad_FromDafny(dafnyInput.Dtor_aad()), } } func AESEncryptInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.AESEncryptInput) awscryptographyprimitivessmithygeneratedtypes.AESEncryptInput { return awscryptographyprimitivessmithygeneratedtypes.AESEncryptInput{EncAlg: Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(dafnyInput.Dtor_encAlg()), Iv: Aws_cryptography_primitives_AESEncryptInput_iv_FromDafny(dafnyInput.Dtor_iv()), Key: Aws_cryptography_primitives_AESEncryptInput_key_FromDafny(dafnyInput.Dtor_key()), Msg: Aws_cryptography_primitives_AESEncryptInput_msg_FromDafny(dafnyInput.Dtor_msg()), Aad: Aws_cryptography_primitives_AESEncryptInput_aad_FromDafny(dafnyInput.Dtor_aad()), } } func AESEncryptOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.AESEncryptOutput) awscryptographyprimitivessmithygeneratedtypes.AESEncryptOutput { return awscryptographyprimitivessmithygeneratedtypes.AESEncryptOutput{CipherText: Aws_cryptography_primitives_AESEncryptOutput_cipherText_FromDafny(dafnyOutput.Dtor_cipherText()), AuthTag: Aws_cryptography_primitives_AESEncryptOutput_authTag_FromDafny(dafnyOutput.Dtor_authTag()), } } func AesKdfCtrInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.AesKdfCtrInput) awscryptographyprimitivessmithygeneratedtypes.AesKdfCtrInput { return awscryptographyprimitivessmithygeneratedtypes.AesKdfCtrInput{Ikm: Aws_cryptography_primitives_AesKdfCtrInput_ikm_FromDafny(dafnyInput.Dtor_ikm()), ExpectedLength: Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(dafnyInput.Dtor_expectedLength()), Nonce: Aws_cryptography_primitives_AesKdfCtrInput_nonce_FromDafny(dafnyInput.Dtor_nonce().UnwrapOr(nil)), } } func CompressPublicKeyInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.CompressPublicKeyInput) awscryptographyprimitivessmithygeneratedtypes.CompressPublicKeyInput { return awscryptographyprimitivessmithygeneratedtypes.CompressPublicKeyInput{PublicKey: Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(dafnyInput.Dtor_publicKey()), EccCurve: Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(dafnyInput.Dtor_eccCurve()), } } func CompressPublicKeyOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.CompressPublicKeyOutput) awscryptographyprimitivessmithygeneratedtypes.CompressPublicKeyOutput { return awscryptographyprimitivessmithygeneratedtypes.CompressPublicKeyOutput{CompressedPublicKey: Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_FromDafny(dafnyOutput.Dtor_compressedPublicKey())} } func DecompressPublicKeyInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.DecompressPublicKeyInput) awscryptographyprimitivessmithygeneratedtypes.DecompressPublicKeyInput { return awscryptographyprimitivessmithygeneratedtypes.DecompressPublicKeyInput{CompressedPublicKey: Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_FromDafny(dafnyInput.Dtor_compressedPublicKey()), EccCurve: Aws_cryptography_primitives_DecompressPublicKeyInput_eccCurve_FromDafny(dafnyInput.Dtor_eccCurve()), } } func DecompressPublicKeyOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.DecompressPublicKeyOutput) awscryptographyprimitivessmithygeneratedtypes.DecompressPublicKeyOutput { return awscryptographyprimitivessmithygeneratedtypes.DecompressPublicKeyOutput{PublicKey: Aws_cryptography_primitives_DecompressPublicKeyOutput_publicKey_FromDafny(dafnyOutput.Dtor_publicKey())} } func DeriveSharedSecretInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.DeriveSharedSecretInput) awscryptographyprimitivessmithygeneratedtypes.DeriveSharedSecretInput { return awscryptographyprimitivessmithygeneratedtypes.DeriveSharedSecretInput{EccCurve: Aws_cryptography_primitives_DeriveSharedSecretInput_eccCurve_FromDafny(dafnyInput.Dtor_eccCurve()), PrivateKey: Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_FromDafny(dafnyInput.Dtor_privateKey()), PublicKey: Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(dafnyInput.Dtor_publicKey()), } } func DeriveSharedSecretOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.DeriveSharedSecretOutput) awscryptographyprimitivessmithygeneratedtypes.DeriveSharedSecretOutput { return awscryptographyprimitivessmithygeneratedtypes.DeriveSharedSecretOutput{SharedSecret: Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_FromDafny(dafnyOutput.Dtor_sharedSecret())} } func DigestInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.DigestInput) awscryptographyprimitivessmithygeneratedtypes.DigestInput { return awscryptographyprimitivessmithygeneratedtypes.DigestInput{DigestAlgorithm: Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(dafnyInput.Dtor_digestAlgorithm()), Message: Aws_cryptography_primitives_DigestInput_message_FromDafny(dafnyInput.Dtor_message()), } } func ECDSASignInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.ECDSASignInput) awscryptographyprimitivessmithygeneratedtypes.ECDSASignInput { return awscryptographyprimitivessmithygeneratedtypes.ECDSASignInput{SignatureAlgorithm: Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(dafnyInput.Dtor_signatureAlgorithm()), SigningKey: Aws_cryptography_primitives_ECDSASignInput_signingKey_FromDafny(dafnyInput.Dtor_signingKey()), Message: Aws_cryptography_primitives_ECDSASignInput_message_FromDafny(dafnyInput.Dtor_message()), } } func ECDSAVerifyInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.ECDSAVerifyInput) awscryptographyprimitivessmithygeneratedtypes.ECDSAVerifyInput { return awscryptographyprimitivessmithygeneratedtypes.ECDSAVerifyInput{SignatureAlgorithm: Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(dafnyInput.Dtor_signatureAlgorithm()), VerificationKey: Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_FromDafny(dafnyInput.Dtor_verificationKey()), Message: Aws_cryptography_primitives_ECDSAVerifyInput_message_FromDafny(dafnyInput.Dtor_message()), Signature: Aws_cryptography_primitives_ECDSAVerifyInput_signature_FromDafny(dafnyInput.Dtor_signature()), } } func GenerateECCKeyPairInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.GenerateECCKeyPairInput) awscryptographyprimitivessmithygeneratedtypes.GenerateECCKeyPairInput { return awscryptographyprimitivessmithygeneratedtypes.GenerateECCKeyPairInput{EccCurve: Aws_cryptography_primitives_GenerateECCKeyPairInput_eccCurve_FromDafny(dafnyInput.Dtor_eccCurve())} } func GenerateECCKeyPairOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.GenerateECCKeyPairOutput) awscryptographyprimitivessmithygeneratedtypes.GenerateECCKeyPairOutput { return awscryptographyprimitivessmithygeneratedtypes.GenerateECCKeyPairOutput{EccCurve: Aws_cryptography_primitives_GenerateECCKeyPairOutput_eccCurve_FromDafny(dafnyOutput.Dtor_eccCurve()), PrivateKey: Aws_cryptography_primitives_GenerateECCKeyPairOutput_privateKey_FromDafny(dafnyOutput.Dtor_privateKey()), PublicKey: Aws_cryptography_primitives_GenerateECCKeyPairOutput_publicKey_FromDafny(dafnyOutput.Dtor_publicKey()), } } func GenerateECDSASignatureKeyInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.GenerateECDSASignatureKeyInput) awscryptographyprimitivessmithygeneratedtypes.GenerateECDSASignatureKeyInput { return awscryptographyprimitivessmithygeneratedtypes.GenerateECDSASignatureKeyInput{SignatureAlgorithm: Aws_cryptography_primitives_GenerateECDSASignatureKeyInput_signatureAlgorithm_FromDafny(dafnyInput.Dtor_signatureAlgorithm())} } func GenerateECDSASignatureKeyOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.GenerateECDSASignatureKeyOutput) awscryptographyprimitivessmithygeneratedtypes.GenerateECDSASignatureKeyOutput { return awscryptographyprimitivessmithygeneratedtypes.GenerateECDSASignatureKeyOutput{SignatureAlgorithm: Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgorithm_FromDafny(dafnyOutput.Dtor_signatureAlgorithm()), VerificationKey: Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_FromDafny(dafnyOutput.Dtor_verificationKey()), SigningKey: Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_FromDafny(dafnyOutput.Dtor_signingKey()), } } func GenerateRandomBytesInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.GenerateRandomBytesInput) awscryptographyprimitivessmithygeneratedtypes.GenerateRandomBytesInput { return awscryptographyprimitivessmithygeneratedtypes.GenerateRandomBytesInput{Length: Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(dafnyInput.Dtor_length())} } func GenerateRSAKeyPairInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.GenerateRSAKeyPairInput) awscryptographyprimitivessmithygeneratedtypes.GenerateRSAKeyPairInput { return awscryptographyprimitivessmithygeneratedtypes.GenerateRSAKeyPairInput{LengthBits: Aws_cryptography_primitives_GenerateRSAKeyPairInput_lengthBits_FromDafny(dafnyInput.Dtor_lengthBits())} } func GenerateRSAKeyPairOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.GenerateRSAKeyPairOutput) awscryptographyprimitivessmithygeneratedtypes.GenerateRSAKeyPairOutput { return awscryptographyprimitivessmithygeneratedtypes.GenerateRSAKeyPairOutput{PublicKey: Aws_cryptography_primitives_GenerateRSAKeyPairOutput_publicKey_FromDafny(dafnyOutput.Dtor_publicKey()), PrivateKey: Aws_cryptography_primitives_GenerateRSAKeyPairOutput_privateKey_FromDafny(dafnyOutput.Dtor_privateKey()), } } func GetPublicKeyFromPrivateKeyInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.GetPublicKeyFromPrivateKeyInput) awscryptographyprimitivessmithygeneratedtypes.GetPublicKeyFromPrivateKeyInput { return awscryptographyprimitivessmithygeneratedtypes.GetPublicKeyFromPrivateKeyInput{EccCurve: Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_eccCurve_FromDafny(dafnyInput.Dtor_eccCurve()), PrivateKey: Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_privateKey_FromDafny(dafnyInput.Dtor_privateKey()), } } func GetPublicKeyFromPrivateKeyOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.GetPublicKeyFromPrivateKeyOutput) awscryptographyprimitivessmithygeneratedtypes.GetPublicKeyFromPrivateKeyOutput { return awscryptographyprimitivessmithygeneratedtypes.GetPublicKeyFromPrivateKeyOutput{EccCurve: Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_eccCurve_FromDafny(dafnyOutput.Dtor_eccCurve()), PrivateKey: Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_FromDafny(dafnyOutput.Dtor_privateKey()), PublicKey: Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_FromDafny(dafnyOutput.Dtor_publicKey()), } } func GetRSAKeyModulusLengthInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.GetRSAKeyModulusLengthInput) awscryptographyprimitivessmithygeneratedtypes.GetRSAKeyModulusLengthInput { return awscryptographyprimitivessmithygeneratedtypes.GetRSAKeyModulusLengthInput{PublicKey: Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_FromDafny(dafnyInput.Dtor_publicKey())} } func GetRSAKeyModulusLengthOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.GetRSAKeyModulusLengthOutput) awscryptographyprimitivessmithygeneratedtypes.GetRSAKeyModulusLengthOutput { return awscryptographyprimitivessmithygeneratedtypes.GetRSAKeyModulusLengthOutput{Length: Aws_cryptography_primitives_GetRSAKeyModulusLengthOutput_length_FromDafny(dafnyOutput.Dtor_length())} } func HkdfInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.HkdfInput) awscryptographyprimitivessmithygeneratedtypes.HkdfInput { return awscryptographyprimitivessmithygeneratedtypes.HkdfInput{DigestAlgorithm: Aws_cryptography_primitives_HkdfInput_digestAlgorithm_FromDafny(dafnyInput.Dtor_digestAlgorithm()), Salt: Aws_cryptography_primitives_HkdfInput_salt_FromDafny(dafnyInput.Dtor_salt().UnwrapOr(nil)), Ikm: Aws_cryptography_primitives_HkdfInput_ikm_FromDafny(dafnyInput.Dtor_ikm()), Info: Aws_cryptography_primitives_HkdfInput_info_FromDafny(dafnyInput.Dtor_info()), ExpectedLength: Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(dafnyInput.Dtor_expectedLength()), } } func HkdfExpandInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.HkdfExpandInput) awscryptographyprimitivessmithygeneratedtypes.HkdfExpandInput { return awscryptographyprimitivessmithygeneratedtypes.HkdfExpandInput{DigestAlgorithm: Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(dafnyInput.Dtor_digestAlgorithm()), Prk: Aws_cryptography_primitives_HkdfExpandInput_prk_FromDafny(dafnyInput.Dtor_prk()), Info: Aws_cryptography_primitives_HkdfExpandInput_info_FromDafny(dafnyInput.Dtor_info()), ExpectedLength: Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(dafnyInput.Dtor_expectedLength()), } } func HkdfExtractInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.HkdfExtractInput) awscryptographyprimitivessmithygeneratedtypes.HkdfExtractInput { return awscryptographyprimitivessmithygeneratedtypes.HkdfExtractInput{DigestAlgorithm: Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(dafnyInput.Dtor_digestAlgorithm()), Salt: Aws_cryptography_primitives_HkdfExtractInput_salt_FromDafny(dafnyInput.Dtor_salt().UnwrapOr(nil)), Ikm: Aws_cryptography_primitives_HkdfExtractInput_ikm_FromDafny(dafnyInput.Dtor_ikm()), } } func HMacInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.HMacInput) awscryptographyprimitivessmithygeneratedtypes.HMacInput { return awscryptographyprimitivessmithygeneratedtypes.HMacInput{DigestAlgorithm: Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(dafnyInput.Dtor_digestAlgorithm()), Key: Aws_cryptography_primitives_HMacInput_key_FromDafny(dafnyInput.Dtor_key()), Message: Aws_cryptography_primitives_HMacInput_message_FromDafny(dafnyInput.Dtor_message()), } } func KdfCtrInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.KdfCtrInput) awscryptographyprimitivessmithygeneratedtypes.KdfCtrInput { return awscryptographyprimitivessmithygeneratedtypes.KdfCtrInput{DigestAlgorithm: Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(dafnyInput.Dtor_digestAlgorithm()), Ikm: Aws_cryptography_primitives_KdfCtrInput_ikm_FromDafny(dafnyInput.Dtor_ikm()), ExpectedLength: Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(dafnyInput.Dtor_expectedLength()), Purpose: Aws_cryptography_primitives_KdfCtrInput_purpose_FromDafny(dafnyInput.Dtor_purpose().UnwrapOr(nil)), Nonce: Aws_cryptography_primitives_KdfCtrInput_nonce_FromDafny(dafnyInput.Dtor_nonce().UnwrapOr(nil)), } } func ParsePublicKeyInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.ParsePublicKeyInput) awscryptographyprimitivessmithygeneratedtypes.ParsePublicKeyInput { return awscryptographyprimitivessmithygeneratedtypes.ParsePublicKeyInput{PublicKey: Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_FromDafny(dafnyInput.Dtor_publicKey())} } func ParsePublicKeyOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.ParsePublicKeyOutput) awscryptographyprimitivessmithygeneratedtypes.ParsePublicKeyOutput { return awscryptographyprimitivessmithygeneratedtypes.ParsePublicKeyOutput{PublicKey: Aws_cryptography_primitives_ParsePublicKeyOutput_publicKey_FromDafny(dafnyOutput.Dtor_publicKey())} } func RSADecryptInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.RSADecryptInput) awscryptographyprimitivessmithygeneratedtypes.RSADecryptInput { return awscryptographyprimitivessmithygeneratedtypes.RSADecryptInput{Padding: Aws_cryptography_primitives_RSADecryptInput_padding_FromDafny(dafnyInput.Dtor_padding()), PrivateKey: Aws_cryptography_primitives_RSADecryptInput_privateKey_FromDafny(dafnyInput.Dtor_privateKey()), CipherText: Aws_cryptography_primitives_RSADecryptInput_cipherText_FromDafny(dafnyInput.Dtor_cipherText()), } } func RSAEncryptInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.RSAEncryptInput) awscryptographyprimitivessmithygeneratedtypes.RSAEncryptInput { return awscryptographyprimitivessmithygeneratedtypes.RSAEncryptInput{Padding: Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(dafnyInput.Dtor_padding()), PublicKey: Aws_cryptography_primitives_RSAEncryptInput_publicKey_FromDafny(dafnyInput.Dtor_publicKey()), Plaintext: Aws_cryptography_primitives_RSAEncryptInput_plaintext_FromDafny(dafnyInput.Dtor_plaintext()), } } func ValidatePublicKeyInput_FromDafny(dafnyInput AwsCryptographyPrimitivesTypes.ValidatePublicKeyInput) awscryptographyprimitivessmithygeneratedtypes.ValidatePublicKeyInput { return awscryptographyprimitivessmithygeneratedtypes.ValidatePublicKeyInput{EccCurve: Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(dafnyInput.Dtor_eccCurve()), PublicKey: Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_FromDafny(dafnyInput.Dtor_publicKey()), } } func ValidatePublicKeyOutput_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.ValidatePublicKeyOutput) awscryptographyprimitivessmithygeneratedtypes.ValidatePublicKeyOutput { return awscryptographyprimitivessmithygeneratedtypes.ValidatePublicKeyOutput{Success: Aws_cryptography_primitives_ValidatePublicKeyOutput_success_FromDafny(dafnyOutput.Dtor_success())} } func AwsCryptographicPrimitivesError_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.Error) awscryptographyprimitivessmithygeneratedtypes.AwsCryptographicPrimitivesError { return awscryptographyprimitivessmithygeneratedtypes.AwsCryptographicPrimitivesError{Message: Aws_cryptography_primitives_AwsCryptographicPrimitivesError_message_FromDafny(dafnyOutput.Dtor_message())} } func CollectionOfErrors_Output_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.Error) awscryptographyprimitivessmithygeneratedtypes.CollectionOfErrors { listOfErrors := dafnyOutput.Dtor_list() message := dafnyOutput.Dtor_message() t := awscryptographyprimitivessmithygeneratedtypes.CollectionOfErrors{} for i := dafny.Iterate(listOfErrors); ; { val, ok := i() if !ok { break } err := val.(AwsCryptographyPrimitivesTypes.Error) t.ListOfErrors = append(t.ListOfErrors, Error_FromDafny(err)) } t.Message = func() string { a := UTF8.Encode(message.(dafny.Sequence)).Dtor_value() s := string(dafny.ToByteArray(a.(dafny.Sequence))) return s }() return t } func OpaqueError_Output_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.Error) awscryptographyprimitivessmithygeneratedtypes.OpaqueError { return awscryptographyprimitivessmithygeneratedtypes.OpaqueError{ ErrObject: dafnyOutput.Dtor_obj(), } } func Error_FromDafny(err AwsCryptographyPrimitivesTypes.Error) error { // Service Errors if err.Is_AwsCryptographicPrimitivesError() { return AwsCryptographicPrimitivesError_FromDafny(err) } //DependentErrors //Unmodelled Errors if err.Is_CollectionOfErrors() { return CollectionOfErrors_Output_FromDafny(err) } return OpaqueError_Output_FromDafny(err) } func CryptoConfig_FromDafny(dafnyOutput AwsCryptographyPrimitivesTypes.CryptoConfig) awscryptographyprimitivessmithygeneratedtypes.CryptoConfig { return awscryptographyprimitivessmithygeneratedtypes.CryptoConfig{} } func AES_CTR_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.AES_CTR { return awscryptographyprimitivessmithygeneratedtypes.AES_CTR{KeyLength: Aws_cryptography_primitives_AES_CTR_keyLength_FromDafny(input.(AwsCryptographyPrimitivesTypes.AES__CTR).Dtor_keyLength()), NonceLength: Aws_cryptography_primitives_AES_CTR_nonceLength_FromDafny(input.(AwsCryptographyPrimitivesTypes.AES__CTR).Dtor_nonceLength()), } } func Aws_cryptography_primitives_AESDecryptInput_encAlg_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.AES_GCM { return awscryptographyprimitivessmithygeneratedtypes.AES_GCM{KeyLength: Aws_cryptography_primitives_AES_GCM_keyLength_FromDafny(input.(AwsCryptographyPrimitivesTypes.AES__GCM).Dtor_keyLength()), TagLength: Aws_cryptography_primitives_AES_GCM_tagLength_FromDafny(input.(AwsCryptographyPrimitivesTypes.AES__GCM).Dtor_tagLength()), IvLength: Aws_cryptography_primitives_AES_GCM_ivLength_FromDafny(input.(AwsCryptographyPrimitivesTypes.AES__GCM).Dtor_ivLength()), } } func Aws_cryptography_primitives_AES_GCM_keyLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_AES_GCM_tagLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_AES_GCM_ivLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_AESDecryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESDecryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESDecryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.AES_GCM { return awscryptographyprimitivessmithygeneratedtypes.AES_GCM{KeyLength: Aws_cryptography_primitives_AES_GCM_keyLength_FromDafny(input.(AwsCryptographyPrimitivesTypes.AES__GCM).Dtor_keyLength()), TagLength: Aws_cryptography_primitives_AES_GCM_tagLength_FromDafny(input.(AwsCryptographyPrimitivesTypes.AES__GCM).Dtor_tagLength()), IvLength: Aws_cryptography_primitives_AES_GCM_ivLength_FromDafny(input.(AwsCryptographyPrimitivesTypes.AES__GCM).Dtor_ivLength()), } } func Aws_cryptography_primitives_AESEncryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESEncryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESEncryptInput_msg_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESEncryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey{Der: Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPublicKey).Dtor_der())} } func Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { return func() awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { var u awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { return func() awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { var u awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_DecompressPublicKeyOutput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey{Der: Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPublicKey).Dtor_der())} } func Aws_cryptography_primitives_DeriveSharedSecretInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { return func() awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { var u awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey{Pem: Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPrivateKey).Dtor_pem())} } func Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey{Der: Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPublicKey).Dtor_der())} } func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.DigestAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_DigestAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.DigestAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_DigestInput_message_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_DigestOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDSASignatureAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_ECDSASignInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ECDSASignInput_message_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDSASignatureAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ECDSAVerifyOutput_success_FromDafny(input interface{}) bool { return input.(bool) } func Aws_cryptography_primitives_GenerateECCKeyPairInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { return func() awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { var u awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_GenerateECCKeyPairOutput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { return func() awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { var u awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_GenerateECCKeyPairOutput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey{Pem: Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPrivateKey).Dtor_pem())} } func Aws_cryptography_primitives_GenerateECCKeyPairOutput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey{Der: Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPublicKey).Dtor_der())} } func Aws_cryptography_primitives_GenerateECDSASignatureKeyInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDSASignatureAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDSASignatureAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDSASignatureAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairInput_lengthBits_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairOutput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPublicKey { return awscryptographyprimitivessmithygeneratedtypes.RSAPublicKey{LengthBits: Aws_cryptography_primitives_RSAPublicKey_lengthBits_FromDafny(input.(AwsCryptographyPrimitivesTypes.RSAPublicKey).Dtor_lengthBits()), Pem: Aws_cryptography_primitives_RSAPublicKey_pem_FromDafny(input.(AwsCryptographyPrimitivesTypes.RSAPublicKey).Dtor_pem()), } } func Aws_cryptography_primitives_RSAPublicKey_lengthBits_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_RSAPublicKey_pem_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairOutput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPrivateKey { return awscryptographyprimitivessmithygeneratedtypes.RSAPrivateKey{LengthBits: Aws_cryptography_primitives_RSAPrivateKey_lengthBits_FromDafny(input.(AwsCryptographyPrimitivesTypes.RSAPrivateKey).Dtor_lengthBits()), Pem: Aws_cryptography_primitives_RSAPrivateKey_pem_FromDafny(input.(AwsCryptographyPrimitivesTypes.RSAPrivateKey).Dtor_pem()), } } func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_RSAPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { return func() awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { var u awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey{Pem: Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPrivateKey).Dtor_pem())} } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { return func() awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { var u awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPrivateKey{Pem: Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPrivateKey).Dtor_pem())} } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthOutput_length_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.DigestAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_DigestAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.DigestAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_HkdfInput_salt_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfInput_info_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_HkdfOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.DigestAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_DigestAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.DigestAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_HkdfExpandInput_prk_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfExpandInput_info_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_HkdfExpandOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.DigestAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_DigestAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.DigestAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_HkdfExtractInput_salt_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.DigestAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_DigestAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.DigestAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_HMacInput_key_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HMacInput_message_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_HMacOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { return func() awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { var u awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm inputEnum := input.(AwsCryptographyPrimitivesTypes.DigestAlgorithm) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_DigestAlgorithm_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.DigestAlgorithm).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_KdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_KdfCtrInput_purpose_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ParsePublicKeyOutput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { return awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey{Der: Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input.(AwsCryptographyPrimitivesTypes.ECCPublicKey).Dtor_der())} } func Aws_cryptography_primitives_RSADecryptInput_padding_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode { return func() awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode { var u awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode inputEnum := input.(AwsCryptographyPrimitivesTypes.RSAPaddingMode) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_RSAPaddingMode_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.RSAPaddingMode).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_RSADecryptInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode { return func() awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode { var u awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode inputEnum := input.(AwsCryptographyPrimitivesTypes.RSAPaddingMode) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_RSAPaddingMode_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.RSAPaddingMode).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_RSAEncryptInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { return func() awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { var u awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec inputEnum := input.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec) index := -1 for allEnums := dafny.Iterate(AwsCryptographyPrimitivesTypes.CompanionStruct_ECDHCurveSpec_{}.AllSingletonConstructors()); ; { enum, ok := allEnums() if ok { index++ if enum.(AwsCryptographyPrimitivesTypes.ECDHCurveSpec).Equals(inputEnum) { break } } } return u.Values()[index] }() } func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { if input == nil { return nil } a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) b := make([]byte, 0, a.Length()) for i := uint32(0); i < a.Length(); i++ { b = append(b, a.Select(i).(byte)) } return b }() } func Aws_cryptography_primitives_ValidatePublicKeyOutput_success_FromDafny(input interface{}) bool { return input.(bool) } func Aws_cryptography_primitives_AwsCryptographicPrimitivesError_message_FromDafny(input interface{}) string { return func() string { a := UTF8.Encode(input.(dafny.Sequence)).Dtor_value() s := string(dafny.ToByteArray(a.(dafny.Sequence))) return s }() } func Aws_cryptography_primitives_AES_CTR_keyLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() } func Aws_cryptography_primitives_AES_CTR_nonceLength_FromDafny(input interface{}) int32 { return func() int32 { var b = input.(int32) return b }() }