UNPKG

468 kBJavaScriptView Raw
1export*from"@virgilsecurity/sdk-crypto";import{ModuleInitializer as e}from"@virgilsecurity/init-utils";import{NodeBuffer as t,toBuffer as _,dataToUint8Array as r}from"@virgilsecurity/data-utils";var s={exports:{}};!function(e,t){var _,r=(_="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,r,s=void 0!==e?e:{};s.ready=new Promise(((e,_)=>{t=e,r=_})),["_malloc","_free","_vsc_data","_vsc_data_ctx_size","_vsc_data_bytes","_vsc_data_len","_vsc_buffer_new","_vsc_buffer_new_with_capacity","_vsc_buffer_delete","_vsc_buffer_make_secure","_vsc_buffer_bytes","_vsc_buffer_data","_vsc_buffer_len","_vscf_error_ctx_size","_vscf_error_status","_vscf_error_reset","_vscf_impl_shallow_copy","_vscf_impl_tag","_vscf_impl_api","_vscf_oid_from_alg_id","_vscf_oid_to_alg_id","_vscf_oid_from_id","_vscf_oid_to_id","_vscf_oid_id_to_alg_id","_vscf_oid_equal","_vscf_base64_encoded_len","_vscf_base64_encode","_vscf_base64_decoded_len","_vscf_base64_decode","_vscf_pem_wrapped_len","_vscf_pem_wrap","_vscf_pem_unwrapped_len","_vscf_pem_unwrap","_vscf_pem_title","_vscf_message_info_new","_vscf_message_info_shallow_copy","_vscf_message_info_delete","_vscf_message_info_data_encryption_alg_info","_vscf_message_info_key_recipient_info_list","_vscf_message_info_password_recipient_info_list","_vscf_message_info_has_custom_params","_vscf_message_info_custom_params","_vscf_message_info_has_cipher_kdf_alg_info","_vscf_message_info_cipher_kdf_alg_info","_vscf_message_info_has_cipher_padding_alg_info","_vscf_message_info_cipher_padding_alg_info","_vscf_message_info_has_footer_info","_vscf_message_info_footer_info","_vscf_message_info_clear","_vscf_key_recipient_info_new","_vscf_key_recipient_info_shallow_copy","_vscf_key_recipient_info_delete","_vscf_key_recipient_info_new_with_data","_vscf_key_recipient_info_recipient_id","_vscf_key_recipient_info_key_encryption_algorithm","_vscf_key_recipient_info_encrypted_key","_vscf_key_recipient_info_list_new","_vscf_key_recipient_info_list_shallow_copy","_vscf_key_recipient_info_list_delete","_vscf_key_recipient_info_list_has_item","_vscf_key_recipient_info_list_item","_vscf_key_recipient_info_list_has_next","_vscf_key_recipient_info_list_next","_vscf_key_recipient_info_list_has_prev","_vscf_key_recipient_info_list_prev","_vscf_key_recipient_info_list_clear","_vscf_password_recipient_info_new","_vscf_password_recipient_info_shallow_copy","_vscf_password_recipient_info_delete","_vscf_password_recipient_info_new_with_members","_vscf_password_recipient_info_key_encryption_algorithm","_vscf_password_recipient_info_encrypted_key","_vscf_password_recipient_info_list_new","_vscf_password_recipient_info_list_shallow_copy","_vscf_password_recipient_info_list_delete","_vscf_password_recipient_info_list_has_item","_vscf_password_recipient_info_list_item","_vscf_password_recipient_info_list_has_next","_vscf_password_recipient_info_list_next","_vscf_password_recipient_info_list_has_prev","_vscf_password_recipient_info_list_prev","_vscf_password_recipient_info_list_clear","_vscf_alg_factory_create_hash_from_info","_vscf_alg_factory_create_mac_from_info","_vscf_alg_factory_create_kdf_from_info","_vscf_alg_factory_create_salted_kdf_from_info","_vscf_alg_factory_create_cipher_from_info","_vscf_alg_factory_create_padding_from_info","_vscf_key_alg_factory_create_from_alg_id","_vscf_key_alg_factory_create_from_key","_vscf_key_alg_factory_create_from_raw_public_key","_vscf_key_alg_factory_create_from_raw_private_key","_vscf_ecies_new","_vscf_ecies_shallow_copy","_vscf_ecies_delete","_vscf_ecies_release_random","_vscf_ecies_use_random","_vscf_ecies_release_cipher","_vscf_ecies_use_cipher","_vscf_ecies_release_mac","_vscf_ecies_use_mac","_vscf_ecies_release_kdf","_vscf_ecies_use_kdf","_vscf_ecies_release_ephemeral_key","_vscf_ecies_use_ephemeral_key","_vscf_ecies_set_key_alg","_vscf_ecies_release_key_alg","_vscf_ecies_setup_defaults","_vscf_ecies_setup_defaults_no_random","_vscf_ecies_encrypted_len","_vscf_ecies_encrypt","_vscf_ecies_decrypted_len","_vscf_ecies_decrypt","_vscf_recipient_cipher_new","_vscf_recipient_cipher_shallow_copy","_vscf_recipient_cipher_delete","_vscf_recipient_cipher_release_random","_vscf_recipient_cipher_use_random","_vscf_recipient_cipher_release_encryption_cipher","_vscf_recipient_cipher_use_encryption_cipher","_vscf_recipient_cipher_release_encryption_padding","_vscf_recipient_cipher_use_encryption_padding","_vscf_recipient_cipher_release_padding_params","_vscf_recipient_cipher_use_padding_params","_vscf_recipient_cipher_release_signer_hash","_vscf_recipient_cipher_use_signer_hash","_vscf_recipient_cipher_has_key_recipient","_vscf_recipient_cipher_add_key_recipient","_vscf_recipient_cipher_clear_recipients","_vscf_recipient_cipher_add_signer","_vscf_recipient_cipher_clear_signers","_vscf_recipient_cipher_custom_params","_vscf_recipient_cipher_start_encryption","_vscf_recipient_cipher_start_signed_encryption","_vscf_recipient_cipher_message_info_len","_vscf_recipient_cipher_pack_message_info","_vscf_recipient_cipher_encryption_out_len","_vscf_recipient_cipher_process_encryption","_vscf_recipient_cipher_finish_encryption","_vscf_recipient_cipher_start_decryption_with_key","_vscf_recipient_cipher_start_verified_decryption_with_key","_vscf_recipient_cipher_decryption_out_len","_vscf_recipient_cipher_process_decryption","_vscf_recipient_cipher_finish_decryption","_vscf_recipient_cipher_is_data_signed","_vscf_recipient_cipher_signer_infos","_vscf_recipient_cipher_verify_signer_info","_vscf_recipient_cipher_message_info_footer_len","_vscf_recipient_cipher_pack_message_info_footer","_vscf_message_info_custom_params_new","_vscf_message_info_custom_params_shallow_copy","_vscf_message_info_custom_params_delete","_vscf_message_info_custom_params_add_int","_vscf_message_info_custom_params_add_string","_vscf_message_info_custom_params_add_data","_vscf_message_info_custom_params_clear","_vscf_message_info_custom_params_find_int","_vscf_message_info_custom_params_find_string","_vscf_message_info_custom_params_find_data","_vscf_message_info_custom_params_has_params","_vscf_key_provider_new","_vscf_key_provider_shallow_copy","_vscf_key_provider_delete","_vscf_key_provider_release_random","_vscf_key_provider_use_random","_vscf_key_provider_setup_defaults","_vscf_key_provider_set_rsa_params","_vscf_key_provider_generate_private_key","_vscf_key_provider_generate_post_quantum_private_key","_vscf_key_provider_generate_compound_private_key","_vscf_key_provider_generate_hybrid_private_key","_vscf_key_provider_generate_compound_hybrid_private_key","_vscf_key_provider_import_private_key","_vscf_key_provider_import_public_key","_vscf_key_provider_exported_public_key_len","_vscf_key_provider_export_public_key","_vscf_key_provider_exported_private_key_len","_vscf_key_provider_export_private_key","_vscf_signer_new","_vscf_signer_shallow_copy","_vscf_signer_delete","_vscf_signer_release_hash","_vscf_signer_use_hash","_vscf_signer_release_random","_vscf_signer_use_random","_vscf_signer_reset","_vscf_signer_append_data","_vscf_signer_signature_len","_vscf_signer_sign","_vscf_verifier_new","_vscf_verifier_shallow_copy","_vscf_verifier_delete","_vscf_verifier_reset","_vscf_verifier_append_data","_vscf_verifier_verify","_vscf_brainkey_client_new","_vscf_brainkey_client_shallow_copy","_vscf_brainkey_client_delete","_vscf_brainkey_client_release_random","_vscf_brainkey_client_use_random","_vscf_brainkey_client_release_operation_random","_vscf_brainkey_client_use_operation_random","_vscf_brainkey_client_setup_defaults","_vscf_brainkey_client_blind","_vscf_brainkey_client_deblind","_vscf_brainkey_server_new","_vscf_brainkey_server_shallow_copy","_vscf_brainkey_server_delete","_vscf_brainkey_server_release_random","_vscf_brainkey_server_use_random","_vscf_brainkey_server_release_operation_random","_vscf_brainkey_server_use_operation_random","_vscf_brainkey_server_setup_defaults","_vscf_brainkey_server_generate_identity_secret","_vscf_brainkey_server_harden","_vscf_group_session_message_new","_vscf_group_session_message_shallow_copy","_vscf_group_session_message_delete","_vscf_group_session_message_get_type","_vscf_group_session_message_get_session_id","_vscf_group_session_message_get_epoch","_vscf_group_session_message_serialize_len","_vscf_group_session_message_serialize","_vscf_group_session_message_deserialize","_vscf_group_session_ticket_new","_vscf_group_session_ticket_shallow_copy","_vscf_group_session_ticket_delete","_vscf_group_session_ticket_release_rng","_vscf_group_session_ticket_use_rng","_vscf_group_session_ticket_setup_defaults","_vscf_group_session_ticket_setup_ticket_as_new","_vscf_group_session_ticket_get_ticket_message","_vscf_group_session_new","_vscf_group_session_shallow_copy","_vscf_group_session_delete","_vscf_group_session_release_rng","_vscf_group_session_use_rng","_vscf_group_session_get_current_epoch","_vscf_group_session_setup_defaults","_vscf_group_session_get_session_id","_vscf_group_session_add_epoch","_vscf_group_session_encrypt","_vscf_group_session_decrypt_len","_vscf_group_session_decrypt","_vscf_group_session_create_group_ticket","_vscf_message_info_editor_new","_vscf_message_info_editor_shallow_copy","_vscf_message_info_editor_delete","_vscf_message_info_editor_release_random","_vscf_message_info_editor_use_random","_vscf_message_info_editor_setup_defaults","_vscf_message_info_editor_unpack","_vscf_message_info_editor_unlock","_vscf_message_info_editor_add_key_recipient","_vscf_message_info_editor_remove_key_recipient","_vscf_message_info_editor_remove_all","_vscf_message_info_editor_packed_len","_vscf_message_info_editor_pack","_vscf_signer_info_new","_vscf_signer_info_shallow_copy","_vscf_signer_info_delete","_vscf_signer_info_signer_id","_vscf_signer_info_signer_alg_info","_vscf_signer_info_signature","_vscf_signer_info_list_new","_vscf_signer_info_list_shallow_copy","_vscf_signer_info_list_delete","_vscf_signer_info_list_has_item","_vscf_signer_info_list_item","_vscf_signer_info_list_has_next","_vscf_signer_info_list_next","_vscf_signer_info_list_has_prev","_vscf_signer_info_list_prev","_vscf_signer_info_list_clear","_vscf_message_info_footer_new","_vscf_message_info_footer_shallow_copy","_vscf_message_info_footer_delete","_vscf_message_info_footer_has_signer_infos","_vscf_message_info_footer_signer_infos","_vscf_message_info_footer_signer_hash_alg_info","_vscf_message_info_footer_signer_digest","_vscf_signed_data_info_new","_vscf_signed_data_info_shallow_copy","_vscf_signed_data_info_delete","_vscf_signed_data_info_hash_alg_info","_vscf_footer_info_new","_vscf_footer_info_shallow_copy","_vscf_footer_info_delete","_vscf_footer_info_has_signed_data_info","_vscf_footer_info_signed_data_info","_vscf_footer_info_set_data_size","_vscf_footer_info_data_size","_vscf_key_info_new","_vscf_key_info_shallow_copy","_vscf_key_info_delete","_vscf_key_info_new_with_alg_info","_vscf_key_info_is_compound","_vscf_key_info_is_hybrid","_vscf_key_info_is_compound_hybrid","_vscf_key_info_is_compound_hybrid_cipher","_vscf_key_info_is_compound_hybrid_signer","_vscf_key_info_is_hybrid_post_quantum","_vscf_key_info_is_hybrid_post_quantum_cipher","_vscf_key_info_is_hybrid_post_quantum_signer","_vscf_key_info_alg_id","_vscf_key_info_compound_cipher_alg_id","_vscf_key_info_compound_signer_alg_id","_vscf_key_info_hybrid_first_key_alg_id","_vscf_key_info_hybrid_second_key_alg_id","_vscf_key_info_compound_hybrid_cipher_first_key_alg_id","_vscf_key_info_compound_hybrid_cipher_second_key_alg_id","_vscf_key_info_compound_hybrid_signer_first_key_alg_id","_vscf_key_info_compound_hybrid_signer_second_key_alg_id","_vscf_padding_params_new","_vscf_padding_params_shallow_copy","_vscf_padding_params_delete","_vscf_padding_params_new_with_constraints","_vscf_padding_params_frame","_vscf_padding_params_frame_max","_vscf_sha224_new","_vscf_sha224_shallow_copy","_vscf_sha224_delete","_vscf_sha224_alg_id","_vscf_sha224_produce_alg_info","_vscf_sha224_restore_alg_info","_vscf_sha224_hash","_vscf_sha224_start","_vscf_sha224_update","_vscf_sha224_finish","_vscf_sha256_new","_vscf_sha256_shallow_copy","_vscf_sha256_delete","_vscf_sha256_alg_id","_vscf_sha256_produce_alg_info","_vscf_sha256_restore_alg_info","_vscf_sha256_hash","_vscf_sha256_start","_vscf_sha256_update","_vscf_sha256_finish","_vscf_sha384_new","_vscf_sha384_shallow_copy","_vscf_sha384_delete","_vscf_sha384_alg_id","_vscf_sha384_produce_alg_info","_vscf_sha384_restore_alg_info","_vscf_sha384_hash","_vscf_sha384_start","_vscf_sha384_update","_vscf_sha384_finish","_vscf_sha512_new","_vscf_sha512_shallow_copy","_vscf_sha512_delete","_vscf_sha512_alg_id","_vscf_sha512_produce_alg_info","_vscf_sha512_restore_alg_info","_vscf_sha512_hash","_vscf_sha512_start","_vscf_sha512_update","_vscf_sha512_finish","_vscf_aes256_gcm_new","_vscf_aes256_gcm_shallow_copy","_vscf_aes256_gcm_delete","_vscf_aes256_gcm_alg_id","_vscf_aes256_gcm_produce_alg_info","_vscf_aes256_gcm_restore_alg_info","_vscf_aes256_gcm_encrypt","_vscf_aes256_gcm_encrypted_len","_vscf_aes256_gcm_precise_encrypted_len","_vscf_aes256_gcm_decrypt","_vscf_aes256_gcm_decrypted_len","_vscf_aes256_gcm_set_nonce","_vscf_aes256_gcm_set_key","_vscf_aes256_gcm_state","_vscf_aes256_gcm_start_encryption","_vscf_aes256_gcm_start_decryption","_vscf_aes256_gcm_update","_vscf_aes256_gcm_out_len","_vscf_aes256_gcm_encrypted_out_len","_vscf_aes256_gcm_decrypted_out_len","_vscf_aes256_gcm_finish","_vscf_aes256_gcm_auth_encrypt","_vscf_aes256_gcm_auth_encrypted_len","_vscf_aes256_gcm_auth_decrypt","_vscf_aes256_gcm_auth_decrypted_len","_vscf_aes256_gcm_set_auth_data","_vscf_aes256_gcm_finish_auth_encryption","_vscf_aes256_gcm_finish_auth_decryption","_vscf_aes256_cbc_new","_vscf_aes256_cbc_shallow_copy","_vscf_aes256_cbc_delete","_vscf_aes256_cbc_alg_id","_vscf_aes256_cbc_produce_alg_info","_vscf_aes256_cbc_restore_alg_info","_vscf_aes256_cbc_encrypt","_vscf_aes256_cbc_encrypted_len","_vscf_aes256_cbc_precise_encrypted_len","_vscf_aes256_cbc_decrypt","_vscf_aes256_cbc_decrypted_len","_vscf_aes256_cbc_set_nonce","_vscf_aes256_cbc_set_key","_vscf_aes256_cbc_state","_vscf_aes256_cbc_start_encryption","_vscf_aes256_cbc_start_decryption","_vscf_aes256_cbc_update","_vscf_aes256_cbc_out_len","_vscf_aes256_cbc_encrypted_out_len","_vscf_aes256_cbc_decrypted_out_len","_vscf_aes256_cbc_finish","_vscf_asn1rd_new","_vscf_asn1rd_shallow_copy","_vscf_asn1rd_delete","_vscf_asn1rd_reset","_vscf_asn1rd_left_len","_vscf_asn1rd_has_error","_vscf_asn1rd_status","_vscf_asn1rd_get_tag","_vscf_asn1rd_get_len","_vscf_asn1rd_get_data_len","_vscf_asn1rd_read_tag","_vscf_asn1rd_read_context_tag","_vscf_asn1rd_read_int","_vscf_asn1rd_read_int8","_vscf_asn1rd_read_int16","_vscf_asn1rd_read_int32","_vscf_asn1rd_read_int64","_vscf_asn1rd_read_uint","_vscf_asn1rd_read_uint8","_vscf_asn1rd_read_uint16","_vscf_asn1rd_read_uint32","_vscf_asn1rd_read_uint64","_vscf_asn1rd_read_bool","_vscf_asn1rd_read_null","_vscf_asn1rd_read_null_optional","_vscf_asn1rd_read_octet_str","_vscf_asn1rd_read_bitstring_as_octet_str","_vscf_asn1rd_read_utf8_str","_vscf_asn1rd_read_oid","_vscf_asn1rd_read_data","_vscf_asn1rd_read_sequence","_vscf_asn1rd_read_set","_vscf_asn1wr_new","_vscf_asn1wr_shallow_copy","_vscf_asn1wr_delete","_vscf_asn1wr_reset","_vscf_asn1wr_finish","_vscf_asn1wr_bytes","_vscf_asn1wr_len","_vscf_asn1wr_written_len","_vscf_asn1wr_unwritten_len","_vscf_asn1wr_has_error","_vscf_asn1wr_status","_vscf_asn1wr_reserve","_vscf_asn1wr_write_tag","_vscf_asn1wr_write_context_tag","_vscf_asn1wr_write_len","_vscf_asn1wr_write_int","_vscf_asn1wr_write_int8","_vscf_asn1wr_write_int16","_vscf_asn1wr_write_int32","_vscf_asn1wr_write_int64","_vscf_asn1wr_write_uint","_vscf_asn1wr_write_uint8","_vscf_asn1wr_write_uint16","_vscf_asn1wr_write_uint32","_vscf_asn1wr_write_uint64","_vscf_asn1wr_write_bool","_vscf_asn1wr_write_null","_vscf_asn1wr_write_octet_str","_vscf_asn1wr_write_octet_str_as_bitstring","_vscf_asn1wr_write_data","_vscf_asn1wr_write_utf8_str","_vscf_asn1wr_write_oid","_vscf_asn1wr_write_sequence","_vscf_asn1wr_write_set","_vscf_rsa_public_key_new","_vscf_rsa_public_key_shallow_copy","_vscf_rsa_public_key_delete","_vscf_rsa_public_key_alg_id","_vscf_rsa_public_key_alg_info","_vscf_rsa_public_key_len","_vscf_rsa_public_key_bitlen","_vscf_rsa_public_key_impl_tag","_vscf_rsa_public_key_is_valid","_vscf_rsa_public_key_key_exponent","_vscf_rsa_private_key_new","_vscf_rsa_private_key_shallow_copy","_vscf_rsa_private_key_delete","_vscf_rsa_private_key_alg_id","_vscf_rsa_private_key_alg_info","_vscf_rsa_private_key_len","_vscf_rsa_private_key_bitlen","_vscf_rsa_private_key_impl_tag","_vscf_rsa_private_key_is_valid","_vscf_rsa_private_key_extract_public_key","_vscf_rsa_new","_vscf_rsa_shallow_copy","_vscf_rsa_delete","_vscf_rsa_release_random","_vscf_rsa_use_random","_vscf_rsa_generate_ephemeral_key","_vscf_rsa_import_public_key","_vscf_rsa_import_public_key_data","_vscf_rsa_export_public_key","_vscf_rsa_exported_public_key_data_len","_vscf_rsa_export_public_key_data","_vscf_rsa_import_private_key","_vscf_rsa_import_private_key_data","_vscf_rsa_export_private_key","_vscf_rsa_exported_private_key_data_len","_vscf_rsa_export_private_key_data","_vscf_rsa_can_encrypt","_vscf_rsa_encrypted_len","_vscf_rsa_encrypt","_vscf_rsa_can_decrypt","_vscf_rsa_decrypted_len","_vscf_rsa_decrypt","_vscf_rsa_can_sign","_vscf_rsa_signature_len","_vscf_rsa_sign_hash","_vscf_rsa_can_verify","_vscf_rsa_verify_hash","_vscf_rsa_setup_defaults","_vscf_rsa_generate_key","_vscf_ecc_public_key_new","_vscf_ecc_public_key_shallow_copy","_vscf_ecc_public_key_delete","_vscf_ecc_public_key_alg_id","_vscf_ecc_public_key_alg_info","_vscf_ecc_public_key_len","_vscf_ecc_public_key_bitlen","_vscf_ecc_public_key_impl_tag","_vscf_ecc_public_key_is_valid","_vscf_ecc_private_key_new","_vscf_ecc_private_key_shallow_copy","_vscf_ecc_private_key_delete","_vscf_ecc_private_key_alg_id","_vscf_ecc_private_key_alg_info","_vscf_ecc_private_key_len","_vscf_ecc_private_key_bitlen","_vscf_ecc_private_key_impl_tag","_vscf_ecc_private_key_is_valid","_vscf_ecc_private_key_extract_public_key","_vscf_ecc_new","_vscf_ecc_shallow_copy","_vscf_ecc_delete","_vscf_ecc_release_random","_vscf_ecc_use_random","_vscf_ecc_release_ecies","_vscf_ecc_use_ecies","_vscf_ecc_generate_ephemeral_key","_vscf_ecc_import_public_key","_vscf_ecc_import_public_key_data","_vscf_ecc_export_public_key","_vscf_ecc_exported_public_key_data_len","_vscf_ecc_export_public_key_data","_vscf_ecc_import_private_key","_vscf_ecc_import_private_key_data","_vscf_ecc_export_private_key","_vscf_ecc_exported_private_key_data_len","_vscf_ecc_export_private_key_data","_vscf_ecc_can_encrypt","_vscf_ecc_encrypted_len","_vscf_ecc_encrypt","_vscf_ecc_can_decrypt","_vscf_ecc_decrypted_len","_vscf_ecc_decrypt","_vscf_ecc_can_sign","_vscf_ecc_signature_len","_vscf_ecc_sign_hash","_vscf_ecc_can_verify","_vscf_ecc_verify_hash","_vscf_ecc_compute_shared_key","_vscf_ecc_shared_key_len","_vscf_ecc_kem_shared_key_len","_vscf_ecc_kem_encapsulated_key_len","_vscf_ecc_kem_encapsulate","_vscf_ecc_kem_decapsulate","_vscf_ecc_setup_defaults","_vscf_ecc_generate_key","_vscf_entropy_accumulator_new","_vscf_entropy_accumulator_shallow_copy","_vscf_entropy_accumulator_delete","_vscf_entropy_accumulator_is_strong","_vscf_entropy_accumulator_gather","_vscf_entropy_accumulator_setup_defaults","_vscf_entropy_accumulator_add_source","_vscf_ctr_drbg_new","_vscf_ctr_drbg_shallow_copy","_vscf_ctr_drbg_delete","_vscf_ctr_drbg_release_entropy_source","_vscf_ctr_drbg_use_entropy_source","_vscf_ctr_drbg_random","_vscf_ctr_drbg_reseed","_vscf_ctr_drbg_setup_defaults","_vscf_ctr_drbg_enable_prediction_resistance","_vscf_ctr_drbg_set_reseed_interval","_vscf_ctr_drbg_set_entropy_len","_vscf_hmac_new","_vscf_hmac_shallow_copy","_vscf_hmac_delete","_vscf_hmac_release_hash","_vscf_hmac_use_hash","_vscf_hmac_alg_id","_vscf_hmac_produce_alg_info","_vscf_hmac_restore_alg_info","_vscf_hmac_digest_len","_vscf_hmac_mac","_vscf_hmac_start","_vscf_hmac_update","_vscf_hmac_finish","_vscf_hmac_reset","_vscf_hkdf_new","_vscf_hkdf_shallow_copy","_vscf_hkdf_delete","_vscf_hkdf_release_hash","_vscf_hkdf_use_hash","_vscf_hkdf_alg_id","_vscf_hkdf_produce_alg_info","_vscf_hkdf_restore_alg_info","_vscf_hkdf_derive","_vscf_hkdf_reset","_vscf_hkdf_set_info","_vscf_kdf1_new","_vscf_kdf1_shallow_copy","_vscf_kdf1_delete","_vscf_kdf1_release_hash","_vscf_kdf1_use_hash","_vscf_kdf1_alg_id","_vscf_kdf1_produce_alg_info","_vscf_kdf1_restore_alg_info","_vscf_kdf1_derive","_vscf_kdf2_new","_vscf_kdf2_shallow_copy","_vscf_kdf2_delete","_vscf_kdf2_release_hash","_vscf_kdf2_use_hash","_vscf_kdf2_alg_id","_vscf_kdf2_produce_alg_info","_vscf_kdf2_restore_alg_info","_vscf_kdf2_derive","_vscf_fake_random_new","_vscf_fake_random_shallow_copy","_vscf_fake_random_delete","_vscf_fake_random_random","_vscf_fake_random_reseed","_vscf_fake_random_is_strong","_vscf_fake_random_gather","_vscf_fake_random_setup_source_byte","_vscf_fake_random_setup_source_data","_vscf_pkcs5_pbkdf2_new","_vscf_pkcs5_pbkdf2_shallow_copy","_vscf_pkcs5_pbkdf2_delete","_vscf_pkcs5_pbkdf2_release_hmac","_vscf_pkcs5_pbkdf2_use_hmac","_vscf_pkcs5_pbkdf2_alg_id","_vscf_pkcs5_pbkdf2_produce_alg_info","_vscf_pkcs5_pbkdf2_restore_alg_info","_vscf_pkcs5_pbkdf2_derive","_vscf_pkcs5_pbkdf2_reset","_vscf_pkcs5_pbkdf2_set_info","_vscf_pkcs5_pbkdf2_setup_defaults","_vscf_pkcs5_pbes2_new","_vscf_pkcs5_pbes2_shallow_copy","_vscf_pkcs5_pbes2_delete","_vscf_pkcs5_pbes2_release_kdf","_vscf_pkcs5_pbes2_use_kdf","_vscf_pkcs5_pbes2_release_cipher","_vscf_pkcs5_pbes2_use_cipher","_vscf_pkcs5_pbes2_alg_id","_vscf_pkcs5_pbes2_produce_alg_info","_vscf_pkcs5_pbes2_restore_alg_info","_vscf_pkcs5_pbes2_encrypt","_vscf_pkcs5_pbes2_encrypted_len","_vscf_pkcs5_pbes2_precise_encrypted_len","_vscf_pkcs5_pbes2_decrypt","_vscf_pkcs5_pbes2_decrypted_len","_vscf_pkcs5_pbes2_reset","_vscf_seed_entropy_source_new","_vscf_seed_entropy_source_shallow_copy","_vscf_seed_entropy_source_delete","_vscf_seed_entropy_source_is_strong","_vscf_seed_entropy_source_gather","_vscf_seed_entropy_source_reset_seed","_vscf_key_material_rng_new","_vscf_key_material_rng_shallow_copy","_vscf_key_material_rng_delete","_vscf_key_material_rng_random","_vscf_key_material_rng_reseed","_vscf_key_material_rng_reset_key_material","_vscf_raw_public_key_new","_vscf_raw_public_key_shallow_copy","_vscf_raw_public_key_delete","_vscf_raw_public_key_alg_id","_vscf_raw_public_key_alg_info","_vscf_raw_public_key_len","_vscf_raw_public_key_bitlen","_vscf_raw_public_key_impl_tag","_vscf_raw_public_key_is_valid","_vscf_raw_public_key_data","_vscf_raw_private_key_new","_vscf_raw_private_key_shallow_copy","_vscf_raw_private_key_delete","_vscf_raw_private_key_alg_id","_vscf_raw_private_key_alg_info","_vscf_raw_private_key_len","_vscf_raw_private_key_bitlen","_vscf_raw_private_key_impl_tag","_vscf_raw_private_key_is_valid","_vscf_raw_private_key_extract_public_key","_vscf_raw_private_key_data","_vscf_raw_private_key_has_public_key","_vscf_raw_private_key_set_public_key","_vscf_raw_private_key_get_public_key","_vscf_pkcs8_serializer_new","_vscf_pkcs8_serializer_shallow_copy","_vscf_pkcs8_serializer_delete","_vscf_pkcs8_serializer_release_asn1_writer","_vscf_pkcs8_serializer_use_asn1_writer","_vscf_pkcs8_serializer_serialized_public_key_len","_vscf_pkcs8_serializer_serialize_public_key","_vscf_pkcs8_serializer_serialized_private_key_len","_vscf_pkcs8_serializer_serialize_private_key","_vscf_pkcs8_serializer_setup_defaults","_vscf_pkcs8_serializer_serialize_public_key_inplace","_vscf_pkcs8_serializer_serialize_private_key_inplace","_vscf_sec1_serializer_new","_vscf_sec1_serializer_shallow_copy","_vscf_sec1_serializer_delete","_vscf_sec1_serializer_release_asn1_writer","_vscf_sec1_serializer_use_asn1_writer","_vscf_sec1_serializer_serialized_public_key_len","_vscf_sec1_serializer_serialize_public_key","_vscf_sec1_serializer_serialized_private_key_len","_vscf_sec1_serializer_serialize_private_key","_vscf_sec1_serializer_setup_defaults","_vscf_sec1_serializer_serialize_public_key_inplace","_vscf_sec1_serializer_serialize_private_key_inplace","_vscf_key_asn1_serializer_new","_vscf_key_asn1_serializer_shallow_copy","_vscf_key_asn1_serializer_delete","_vscf_key_asn1_serializer_release_asn1_writer","_vscf_key_asn1_serializer_use_asn1_writer","_vscf_key_asn1_serializer_serialized_public_key_len","_vscf_key_asn1_serializer_serialize_public_key","_vscf_key_asn1_serializer_serialized_private_key_len","_vscf_key_asn1_serializer_serialize_private_key","_vscf_key_asn1_serializer_setup_defaults","_vscf_key_asn1_serializer_serialize_public_key_inplace","_vscf_key_asn1_serializer_serialize_private_key_inplace","_vscf_key_asn1_deserializer_new","_vscf_key_asn1_deserializer_shallow_copy","_vscf_key_asn1_deserializer_delete","_vscf_key_asn1_deserializer_release_asn1_reader","_vscf_key_asn1_deserializer_use_asn1_reader","_vscf_key_asn1_deserializer_deserialize_public_key","_vscf_key_asn1_deserializer_deserialize_private_key","_vscf_key_asn1_deserializer_setup_defaults","_vscf_key_asn1_deserializer_deserialize_public_key_inplace","_vscf_key_asn1_deserializer_deserialize_private_key_inplace","_vscf_ed25519_new","_vscf_ed25519_shallow_copy","_vscf_ed25519_delete","_vscf_ed25519_release_random","_vscf_ed25519_use_random","_vscf_ed25519_release_ecies","_vscf_ed25519_use_ecies","_vscf_ed25519_generate_ephemeral_key","_vscf_ed25519_import_public_key","_vscf_ed25519_import_public_key_data","_vscf_ed25519_export_public_key","_vscf_ed25519_exported_public_key_data_len","_vscf_ed25519_export_public_key_data","_vscf_ed25519_import_private_key","_vscf_ed25519_import_private_key_data","_vscf_ed25519_export_private_key","_vscf_ed25519_exported_private_key_data_len","_vscf_ed25519_export_private_key_data","_vscf_ed25519_can_encrypt","_vscf_ed25519_encrypted_len","_vscf_ed25519_encrypt","_vscf_ed25519_can_decrypt","_vscf_ed25519_decrypted_len","_vscf_ed25519_decrypt","_vscf_ed25519_can_sign","_vscf_ed25519_signature_len","_vscf_ed25519_sign_hash","_vscf_ed25519_can_verify","_vscf_ed25519_verify_hash","_vscf_ed25519_compute_shared_key","_vscf_ed25519_shared_key_len","_vscf_ed25519_kem_shared_key_len","_vscf_ed25519_kem_encapsulated_key_len","_vscf_ed25519_kem_encapsulate","_vscf_ed25519_kem_decapsulate","_vscf_ed25519_setup_defaults","_vscf_ed25519_generate_key","_vscf_curve25519_new","_vscf_curve25519_shallow_copy","_vscf_curve25519_delete","_vscf_curve25519_release_random","_vscf_curve25519_use_random","_vscf_curve25519_release_ecies","_vscf_curve25519_use_ecies","_vscf_curve25519_generate_ephemeral_key","_vscf_curve25519_import_public_key","_vscf_curve25519_import_public_key_data","_vscf_curve25519_export_public_key","_vscf_curve25519_exported_public_key_data_len","_vscf_curve25519_export_public_key_data","_vscf_curve25519_import_private_key","_vscf_curve25519_import_private_key_data","_vscf_curve25519_export_private_key","_vscf_curve25519_exported_private_key_data_len","_vscf_curve25519_export_private_key_data","_vscf_curve25519_can_encrypt","_vscf_curve25519_encrypted_len","_vscf_curve25519_encrypt","_vscf_curve25519_can_decrypt","_vscf_curve25519_decrypted_len","_vscf_curve25519_decrypt","_vscf_curve25519_compute_shared_key","_vscf_curve25519_shared_key_len","_vscf_curve25519_kem_shared_key_len","_vscf_curve25519_kem_encapsulated_key_len","_vscf_curve25519_kem_encapsulate","_vscf_curve25519_kem_decapsulate","_vscf_curve25519_setup_defaults","_vscf_curve25519_generate_key","_vscf_falcon_new","_vscf_falcon_shallow_copy","_vscf_falcon_delete","_vscf_falcon_release_random","_vscf_falcon_use_random","_vscf_falcon_alg_id","_vscf_falcon_produce_alg_info","_vscf_falcon_restore_alg_info","_vscf_falcon_generate_ephemeral_key","_vscf_falcon_import_public_key","_vscf_falcon_import_public_key_data","_vscf_falcon_export_public_key","_vscf_falcon_exported_public_key_data_len","_vscf_falcon_export_public_key_data","_vscf_falcon_import_private_key","_vscf_falcon_import_private_key_data","_vscf_falcon_export_private_key","_vscf_falcon_exported_private_key_data_len","_vscf_falcon_export_private_key_data","_vscf_falcon_can_sign","_vscf_falcon_signature_len","_vscf_falcon_sign_hash","_vscf_falcon_can_verify","_vscf_falcon_verify_hash","_vscf_falcon_setup_defaults","_vscf_falcon_generate_key","_vscf_round5_new","_vscf_round5_shallow_copy","_vscf_round5_delete","_vscf_round5_release_random","_vscf_round5_use_random","_vscf_round5_generate_ephemeral_key","_vscf_round5_import_public_key","_vscf_round5_import_public_key_data","_vscf_round5_export_public_key","_vscf_round5_exported_public_key_data_len","_vscf_round5_export_public_key_data","_vscf_round5_import_private_key","_vscf_round5_import_private_key_data","_vscf_round5_export_private_key","_vscf_round5_exported_private_key_data_len","_vscf_round5_export_private_key_data","_vscf_round5_kem_shared_key_len","_vscf_round5_kem_encapsulated_key_len","_vscf_round5_kem_encapsulate","_vscf_round5_kem_decapsulate","_vscf_round5_setup_defaults","_vscf_round5_generate_key","_vscf_compound_key_alg_info_new","_vscf_compound_key_alg_info_shallow_copy","_vscf_compound_key_alg_info_delete","_vscf_compound_key_alg_info_alg_id","_vscf_compound_key_alg_info_cipher_alg_info","_vscf_compound_key_alg_info_signer_alg_info","_vscf_compound_public_key_new","_vscf_compound_public_key_shallow_copy","_vscf_compound_public_key_delete","_vscf_compound_public_key_alg_id","_vscf_compound_public_key_alg_info","_vscf_compound_public_key_len","_vscf_compound_public_key_bitlen","_vscf_compound_public_key_impl_tag","_vscf_compound_public_key_is_valid","_vscf_compound_public_key_cipher_key","_vscf_compound_public_key_signer_key","_vscf_compound_private_key_new","_vscf_compound_private_key_shallow_copy","_vscf_compound_private_key_delete","_vscf_compound_private_key_alg_id","_vscf_compound_private_key_alg_info","_vscf_compound_private_key_len","_vscf_compound_private_key_bitlen","_vscf_compound_private_key_impl_tag","_vscf_compound_private_key_is_valid","_vscf_compound_private_key_extract_public_key","_vscf_compound_private_key_cipher_key","_vscf_compound_private_key_signer_key","_vscf_compound_key_alg_new","_vscf_compound_key_alg_shallow_copy","_vscf_compound_key_alg_delete","_vscf_compound_key_alg_release_random","_vscf_compound_key_alg_use_random","_vscf_compound_key_alg_alg_id","_vscf_compound_key_alg_produce_alg_info","_vscf_compound_key_alg_restore_alg_info","_vscf_compound_key_alg_generate_ephemeral_key","_vscf_compound_key_alg_import_public_key","_vscf_compound_key_alg_import_public_key_data","_vscf_compound_key_alg_export_public_key","_vscf_compound_key_alg_exported_public_key_data_len","_vscf_compound_key_alg_export_public_key_data","_vscf_compound_key_alg_import_private_key","_vscf_compound_key_alg_import_private_key_data","_vscf_compound_key_alg_export_private_key","_vscf_compound_key_alg_exported_private_key_data_len","_vscf_compound_key_alg_export_private_key_data","_vscf_compound_key_alg_can_encrypt","_vscf_compound_key_alg_encrypted_len","_vscf_compound_key_alg_encrypt","_vscf_compound_key_alg_can_decrypt","_vscf_compound_key_alg_decrypted_len","_vscf_compound_key_alg_decrypt","_vscf_compound_key_alg_can_sign","_vscf_compound_key_alg_signature_len","_vscf_compound_key_alg_sign_hash","_vscf_compound_key_alg_can_verify","_vscf_compound_key_alg_verify_hash","_vscf_compound_key_alg_setup_defaults","_vscf_compound_key_alg_make_key","_vscf_hybrid_key_alg_info_new","_vscf_hybrid_key_alg_info_shallow_copy","_vscf_hybrid_key_alg_info_delete","_vscf_hybrid_key_alg_info_alg_id","_vscf_hybrid_key_alg_info_first_key_alg_info","_vscf_hybrid_key_alg_info_second_key_alg_info","_vscf_hybrid_public_key_new","_vscf_hybrid_public_key_shallow_copy","_vscf_hybrid_public_key_delete","_vscf_hybrid_public_key_alg_id","_vscf_hybrid_public_key_alg_info","_vscf_hybrid_public_key_len","_vscf_hybrid_public_key_bitlen","_vscf_hybrid_public_key_impl_tag","_vscf_hybrid_public_key_is_valid","_vscf_hybrid_public_key_first_key","_vscf_hybrid_public_key_second_key","_vscf_hybrid_private_key_new","_vscf_hybrid_private_key_shallow_copy","_vscf_hybrid_private_key_delete","_vscf_hybrid_private_key_alg_id","_vscf_hybrid_private_key_alg_info","_vscf_hybrid_private_key_len","_vscf_hybrid_private_key_bitlen","_vscf_hybrid_private_key_impl_tag","_vscf_hybrid_private_key_is_valid","_vscf_hybrid_private_key_extract_public_key","_vscf_hybrid_private_key_first_key","_vscf_hybrid_private_key_second_key","_vscf_hybrid_key_alg_new","_vscf_hybrid_key_alg_shallow_copy","_vscf_hybrid_key_alg_delete","_vscf_hybrid_key_alg_release_random","_vscf_hybrid_key_alg_use_random","_vscf_hybrid_key_alg_release_cipher","_vscf_hybrid_key_alg_use_cipher","_vscf_hybrid_key_alg_release_hash","_vscf_hybrid_key_alg_use_hash","_vscf_hybrid_key_alg_generate_ephemeral_key","_vscf_hybrid_key_alg_import_public_key","_vscf_hybrid_key_alg_import_public_key_data","_vscf_hybrid_key_alg_export_public_key","_vscf_hybrid_key_alg_exported_public_key_data_len","_vscf_hybrid_key_alg_export_public_key_data","_vscf_hybrid_key_alg_import_private_key","_vscf_hybrid_key_alg_import_private_key_data","_vscf_hybrid_key_alg_export_private_key","_vscf_hybrid_key_alg_exported_private_key_data_len","_vscf_hybrid_key_alg_export_private_key_data","_vscf_hybrid_key_alg_can_encrypt","_vscf_hybrid_key_alg_encrypted_len","_vscf_hybrid_key_alg_encrypt","_vscf_hybrid_key_alg_can_decrypt","_vscf_hybrid_key_alg_decrypted_len","_vscf_hybrid_key_alg_decrypt","_vscf_hybrid_key_alg_can_sign","_vscf_hybrid_key_alg_signature_len","_vscf_hybrid_key_alg_sign_hash","_vscf_hybrid_key_alg_can_verify","_vscf_hybrid_key_alg_verify_hash","_vscf_hybrid_key_alg_setup_defaults","_vscf_hybrid_key_alg_make_key","_vscf_simple_alg_info_new","_vscf_simple_alg_info_shallow_copy","_vscf_simple_alg_info_delete","_vscf_simple_alg_info_new_with_alg_id","_vscf_simple_alg_info_alg_id","_vscf_hash_based_alg_info_new","_vscf_hash_based_alg_info_shallow_copy","_vscf_hash_based_alg_info_delete","_vscf_hash_based_alg_info_alg_id","_vscf_hash_based_alg_info_hash_alg_info","_vscf_cipher_alg_info_new","_vscf_cipher_alg_info_shallow_copy","_vscf_cipher_alg_info_delete","_vscf_cipher_alg_info_new_with_members","_vscf_cipher_alg_info_alg_id","_vscf_cipher_alg_info_nonce","_vscf_salted_kdf_alg_info_new","_vscf_salted_kdf_alg_info_shallow_copy","_vscf_salted_kdf_alg_info_delete","_vscf_salted_kdf_alg_info_alg_id","_vscf_salted_kdf_alg_info_hash_alg_info","_vscf_salted_kdf_alg_info_salt","_vscf_salted_kdf_alg_info_iteration_count","_vscf_pbe_alg_info_new","_vscf_pbe_alg_info_shallow_copy","_vscf_pbe_alg_info_delete","_vscf_pbe_alg_info_alg_id","_vscf_pbe_alg_info_kdf_alg_info","_vscf_pbe_alg_info_cipher_alg_info","_vscf_ecc_alg_info_new","_vscf_ecc_alg_info_shallow_copy","_vscf_ecc_alg_info_delete","_vscf_ecc_alg_info_new_with_members","_vscf_ecc_alg_info_alg_id","_vscf_ecc_alg_info_key_id","_vscf_ecc_alg_info_domain_id","_vscf_alg_info_der_serializer_new","_vscf_alg_info_der_serializer_shallow_copy","_vscf_alg_info_der_serializer_delete","_vscf_alg_info_der_serializer_release_asn1_writer","_vscf_alg_info_der_serializer_use_asn1_writer","_vscf_alg_info_der_serializer_serialized_len","_vscf_alg_info_der_serializer_serialize","_vscf_alg_info_der_serializer_setup_defaults","_vscf_alg_info_der_serializer_serialize_inplace","_vscf_alg_info_der_deserializer_new","_vscf_alg_info_der_deserializer_shallow_copy","_vscf_alg_info_der_deserializer_delete","_vscf_alg_info_der_deserializer_release_asn1_reader","_vscf_alg_info_der_deserializer_use_asn1_reader","_vscf_alg_info_der_deserializer_deserialize","_vscf_alg_info_der_deserializer_setup_defaults","_vscf_alg_info_der_deserializer_deserialize_inplace","_vscf_message_info_der_serializer_new","_vscf_message_info_der_serializer_shallow_copy","_vscf_message_info_der_serializer_delete","_vscf_message_info_der_serializer_release_asn1_reader","_vscf_message_info_der_serializer_use_asn1_reader","_vscf_message_info_der_serializer_release_asn1_writer","_vscf_message_info_der_serializer_use_asn1_writer","_vscf_message_info_der_serializer_serialized_len","_vscf_message_info_der_serializer_serialize","_vscf_message_info_der_serializer_read_prefix","_vscf_message_info_der_serializer_deserialize","_vscf_message_info_der_serializer_serialized_footer_len","_vscf_message_info_der_serializer_serialize_footer","_vscf_message_info_der_serializer_deserialize_footer","_vscf_message_info_der_serializer_setup_defaults","_vscf_random_padding_new","_vscf_random_padding_shallow_copy","_vscf_random_padding_delete","_vscf_random_padding_release_random","_vscf_random_padding_use_random","_vscf_random_padding_alg_id","_vscf_random_padding_produce_alg_info","_vscf_random_padding_restore_alg_info","_vscf_random_padding_configure","_vscf_random_padding_padded_data_len","_vscf_random_padding_len","_vscf_random_padding_len_max","_vscf_random_padding_start_data_processing","_vscf_random_padding_process_data","_vscf_random_padding_finish_data_processing","_vscf_random_padding_start_padded_data_processing","_vscf_random_padding_process_padded_data","_vscf_random_padding_finish_padded_data_processing_out_len","_vscf_random_padding_finish_padded_data_processing","_fflush","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(s.ready,e)||Object.defineProperty(s.ready,e,{get:()=>B("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>B("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));var n=Object.assign({},s),c=(e,t)=>{throw t};if(s.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var a,i,o="";if("undefined"!=typeof document&&document.currentScript&&(o=document.currentScript.src),_&&(o=_),o=0!==o.indexOf("blob:")?o.substr(0,o.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},i=(e,t,_)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):_()},r.onerror=_,r.send(null)};var l,f,d=s.print||console.log.bind(console),u=s.printErr||console.warn.bind(console);Object.assign(s,n),n=null,l="fetchSettings",Object.getOwnPropertyDescriptor(s,l)&&B("`Module."+l+"` was supplied but `"+l+"` not included in INCOMING_MODULE_JS_API"),s.arguments&&s.arguments,Z("arguments","arguments_"),s.thisProgram&&s.thisProgram,Z("thisProgram","thisProgram"),s.quit&&(c=s.quit),Z("quit","quit_"),w(void 0===s.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),w(void 0===s.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),w(void 0===s.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),w(void 0===s.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),w(void 0===s.read,"Module.read option was removed (modify read_ in JS)"),w(void 0===s.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),w(void 0===s.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),w(void 0===s.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),w(void 0===s.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Z("read","read_"),Z("readAsync","readAsync"),Z("readBinary","readBinary"),Z("setWindowTitle","setWindowTitle"),w(!0,"worker environment detected but not enabled at build time. Add 'worker' to `-sENVIRONMENT` to enable."),w(!0,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),w(!0,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),s.wasmBinary&&(f=s.wasmBinary),Z("wasmBinary","wasmBinary");var v,h=s.noExitRuntime||!0;Z("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&B("no native wasm support detected");var p,y,P,m,g,x,k,E=!1;function w(e,t){e||B("Assertion failed"+(t?": "+t:""))}function b(){var e=v.buffer;s.HEAP8=y=new Int8Array(e),s.HEAP16=m=new Int16Array(e),s.HEAP32=g=new Int32Array(e),s.HEAPU8=P=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAPU32=x=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e)}function N(){if(!E){var e=Ke();0==e&&(e+=4);var t=x[e>>2],_=x[e+4>>2];34821223==t&&2310721022==_||B("Stack overflow! Stack cookie has been overwritten at "+te(e)+", expected hex dwords 0x89BACDFE and 0x2135467, but received "+te(_)+" "+te(t)),1668509029!==x[0]&&B("Runtime error: The application has corrupted its heap memory area (address zero)!")}}w(!s.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),w("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),w(!s.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),w(!s.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var I=[],A=[],C=[],T=!1,F=0;function K(){return h||F>0}w(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),w(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),w(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),w(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var S=0,L=null,R=null,z={};function D(e){for(var t=e;;){if(!z[e])return e;e=t+Math.random()}}function U(e){S++,s.monitorRunDependencies&&s.monitorRunDependencies(S),e?(w(!z[e]),z[e]=1,null===L&&"undefined"!=typeof setInterval&&(L=setInterval((()=>{if(E)return clearInterval(L),void(L=null);var e=!1;for(var t in z)e||(e=!0,u("still waiting on run dependencies:")),u("dependency: "+t);e&&u("(end of list)")}),1e4))):u("warning: run dependency added without ID")}function M(e){if(S--,s.monitorRunDependencies&&s.monitorRunDependencies(S),e?(w(z[e]),delete z[e]):u("warning: run dependency removed without ID"),0==S&&(null!==L&&(clearInterval(L),L=null),R)){var t=R;R=null,t()}}function B(e){s.onAbort&&s.onAbort(e),u(e="Aborted("+e+")"),E=!0,p=1;var t=new WebAssembly.RuntimeError(e);throw r(t),t}var O,Y,H,G,V;function W(e){return e.startsWith("data:application/octet-stream;base64,")}function X(e,t){return function(){var _=e,r=t;return t||(r=s.asm),w(T,"native function `"+_+"` called before runtime initialization"),r[e]||w(r[e],"exported native function `"+_+"` not found"),r[e].apply(null,arguments)}}function j(e){try{if(e==O&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}catch(e){B(e)}}function q(e,t,_){return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>j(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>j(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(_,(e=>{u("failed to asynchronously prepare wasm: "+e),O.startsWith("file://")&&u("warning: Loading from a file URI ("+O+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),B(e)}))}function Z(e,t){Object.getOwnPropertyDescriptor(s,e)||Object.defineProperty(s,e,{configurable:!0,get:function(){B("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function $(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function J(e){Object.getOwnPropertyDescriptor(s,e)||Object.defineProperty(s,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";$(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),B(t)}})}function Q(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function ee(e){for(;e.length>0;)e.shift()(s)}function te(e){return w("number"==typeof e),"0x"+e.toString(16).padStart(8,"0")}function _e(e){_e.shown||(_e.shown={}),_e.shown[e]||(_e.shown[e]=1,u(e))}W(O="libfoundation.browser.wasm")||(Y=O,O=s.locateFile?s.locateFile(Y,o):o+Y),V="buffer","undefined"!=typeof globalThis&&Object.defineProperty(globalThis,V,{configurable:!0,get:function(){_e("`"+V+"` is not longer defined by emscripten. Please use HEAP8.buffer or wasmMemory.buffer")}});var re="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function se(e,t,_){for(var r=t+_,s=t;e[s]&&!(s>=r);)++s;if(s-t>16&&e.buffer&&re)return re.decode(e.subarray(t,s));for(var n="";t<s;){var c=e[t++];if(128&c){var a=63&e[t++];if(192!=(224&c)){var i=63&e[t++];if(224==(240&c)?c=(15&c)<<12|a<<6|i:(240!=(248&c)&&_e("Invalid UTF-8 leading byte "+te(c)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),c=(7&c)<<18|a<<12|i<<6|63&e[t++]),c<65536)n+=String.fromCharCode(c);else{var o=c-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}}else n+=String.fromCharCode((31&c)<<6|a)}else n+=String.fromCharCode(c)}return n}function ne(e,t){return w("number"==typeof e),e?se(P,e,t):""}var ce=[],ae={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var _=0,r=e.length-1;r>=0;r--){var s=e[r];"."===s?e.splice(r,1):".."===s?(e.splice(r,1),_++):_&&(e.splice(r,1),_--)}if(t)for(;_;_--)e.unshift("..");return e},normalize:e=>{var t=ae.isAbs(e),_="/"===e.substr(-1);return(e=ae.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&_&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ae.splitPath(e),_=t[0],r=t[1];return _||r?(r&&(r=r.substr(0,r.length-1)),_+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ae.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ae.normalize(e.join("/"))},join2:(e,t)=>ae.normalize(e+"/"+t)};function ie(e){return(ie=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);B("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}())(e)}var oe={resolve:function(){for(var e="",t=!1,_=arguments.length-1;_>=-1&&!t;_--){var r=_>=0?arguments[_]:Pe.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t=ae.isAbs(r)}return(t?"/":"")+(e=ae.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function _(e){for(var t=0;t<e.length&&""===e[t];t++);for(var _=e.length-1;_>=0&&""===e[_];_--);return t>_?[]:e.slice(t,_-t+1)}e=oe.resolve(e).substr(1),t=oe.resolve(t).substr(1);for(var r=_(e.split("/")),s=_(t.split("/")),n=Math.min(r.length,s.length),c=n,a=0;a<n;a++)if(r[a]!==s[a]){c=a;break}var i=[];for(a=c;a<r.length;a++)i.push("..");return(i=i.concat(s.slice(c))).join("/")}};function le(e){for(var t=0,_=0;_<e.length;++_){var r=e.charCodeAt(_);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++_):t+=3}return t}function fe(e,t,_,r){if(w("string"==typeof e),!(r>0))return 0;for(var s=_,n=_+r-1,c=0;c<e.length;++c){var a=e.charCodeAt(c);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++c)),a<=127){if(_>=n)break;t[_++]=a}else if(a<=2047){if(_+1>=n)break;t[_++]=192|a>>6,t[_++]=128|63&a}else if(a<=65535){if(_+2>=n)break;t[_++]=224|a>>12,t[_++]=128|a>>6&63,t[_++]=128|63&a}else{if(_+3>=n)break;a>1114111&&_e("Invalid Unicode code point "+te(a)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[_++]=240|a>>18,t[_++]=128|a>>12&63,t[_++]=128|a>>6&63,t[_++]=128|63&a}}return t[_]=0,_-s}function de(e,t,_){var r=_>0?_:le(e)+1,s=new Array(r),n=fe(e,s,0,s.length);return t&&(s.length=n),s}var ue={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){ue.ttys[e]={input:[],output:[],ops:t},Pe.registerDevice(e,ue.stream_ops)},stream_ops:{open:function(e){var t=ue.ttys[e.node.rdev];if(!t)throw new Pe.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,_,r,s){if(!e.tty||!e.tty.ops.get_char)throw new Pe.ErrnoError(60);for(var n=0,c=0;c<r;c++){var a;try{a=e.tty.ops.get_char(e.tty)}catch(e){throw new Pe.ErrnoError(29)}if(void 0===a&&0===n)throw new Pe.ErrnoError(6);if(null==a)break;n++,t[_+c]=a}return n&&(e.node.timestamp=Date.now()),n},write:function(e,t,_,r,s){if(!e.tty||!e.tty.ops.put_char)throw new Pe.ErrnoError(60);try{for(var n=0;n<r;n++)e.tty.ops.put_char(e.tty,t[_+n])}catch(e){throw new Pe.ErrnoError(29)}return r&&(e.node.timestamp=Date.now()),n}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=de(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(d(se(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(d(se(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(u(se(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(u(se(e.output,0)),e.output=[])}}};function ve(e){B("internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported")}var he={ops_table:null,mount:function(e){return he.createNode(null,"/",16895,0)},createNode:function(e,t,_,r){if(Pe.isBlkdev(_)||Pe.isFIFO(_))throw new Pe.ErrnoError(63);he.ops_table||(he.ops_table={dir:{node:{getattr:he.node_ops.getattr,setattr:he.node_ops.setattr,lookup:he.node_ops.lookup,mknod:he.node_ops.mknod,rename:he.node_ops.rename,unlink:he.node_ops.unlink,rmdir:he.node_ops.rmdir,readdir:he.node_ops.readdir,symlink:he.node_ops.symlink},stream:{llseek:he.stream_ops.llseek}},file:{node:{getattr:he.node_ops.getattr,setattr:he.node_ops.setattr},stream:{llseek:he.stream_ops.llseek,read:he.stream_ops.read,write:he.stream_ops.write,allocate:he.stream_ops.allocate,mmap:he.stream_ops.mmap,msync:he.stream_ops.msync}},link:{node:{getattr:he.node_ops.getattr,setattr:he.node_ops.setattr,readlink:he.node_ops.readlink},stream:{}},chrdev:{node:{getattr:he.node_ops.getattr,setattr:he.node_ops.setattr},stream:Pe.chrdev_stream_ops}});var s=Pe.createNode(e,t,_,r);return Pe.isDir(s.mode)?(s.node_ops=he.ops_table.dir.node,s.stream_ops=he.ops_table.dir.stream,s.contents={}):Pe.isFile(s.mode)?(s.node_ops=he.ops_table.file.node,s.stream_ops=he.ops_table.file.stream,s.usedBytes=0,s.contents=null):Pe.isLink(s.mode)?(s.node_ops=he.ops_table.link.node,s.stream_ops=he.ops_table.link.stream):Pe.isChrdev(s.mode)&&(s.node_ops=he.ops_table.chrdev.node,s.stream_ops=he.ops_table.chrdev.stream),s.timestamp=Date.now(),e&&(e.contents[t]=s,e.timestamp=s.timestamp),s},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var _=e.contents?e.contents.length:0;if(!(_>=t)){t=Math.max(t,_*(_<1048576?2:1.125)>>>0),0!=_&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var _=e.contents;e.contents=new Uint8Array(t),_&&e.contents.set(_.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=Pe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Pe.isDir(e.mode)?t.size=4096:Pe.isFile(e.mode)?t.size=e.usedBytes:Pe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&he.resizeFileStorage(e,t.size)},lookup:function(e,t){throw Pe.genericErrors[44]},mknod:function(e,t,_,r){return he.createNode(e,t,_,r)},rename:function(e,t,_){if(Pe.isDir(e.mode)){var r;try{r=Pe.lookupNode(t,_)}catch(e){}if(r)for(var s in r.contents)throw new Pe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=_,t.contents[_]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var _=Pe.lookupNode(e,t);for(var r in _.contents)throw new Pe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var _ in e.contents)e.contents.hasOwnProperty(_)&&t.push(_);return t},symlink:function(e,t,_){var r=he.createNode(e,t,41471,0);return r.link=_,r},readlink:function(e){if(!Pe.isLink(e.mode))throw new Pe.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,_,r,s){var n=e.node.contents;if(s>=e.node.usedBytes)return 0;var c=Math.min(e.node.usedBytes-s,r);if(w(c>=0),c>8&&n.subarray)t.set(n.subarray(s,s+c),_);else for(var a=0;a<c;a++)t[_+a]=n[s+a];return c},write:function(e,t,_,r,s,n){if(w(!(t instanceof ArrayBuffer)),t.buffer===y.buffer&&(n=!1),!r)return 0;var c=e.node;if(c.timestamp=Date.now(),t.subarray&&(!c.contents||c.contents.subarray)){if(n)return w(0===s,"canOwn must imply no weird position inside the file"),c.contents=t.subarray(_,_+r),c.usedBytes=r,r;if(0===c.usedBytes&&0===s)return c.contents=t.slice(_,_+r),c.usedBytes=r,r;if(s+r<=c.usedBytes)return c.contents.set(t.subarray(_,_+r),s),r}if(he.expandFileStorage(c,s+r),c.contents.subarray&&t.subarray)c.contents.set(t.subarray(_,_+r),s);else for(var a=0;a<r;a++)c.contents[s+a]=t[_+a];return c.usedBytes=Math.max(c.usedBytes,s+r),r},llseek:function(e,t,_){var r=t;if(1===_?r+=e.position:2===_&&Pe.isFile(e.node.mode)&&(r+=e.node.usedBytes),r<0)throw new Pe.ErrnoError(28);return r},allocate:function(e,t,_){he.expandFileStorage(e.node,t+_),e.node.usedBytes=Math.max(e.node.usedBytes,t+_)},mmap:function(e,t,_,r,s){if(!Pe.isFile(e.node.mode))throw new Pe.ErrnoError(43);var n,c,a=e.node.contents;if(2&s||a.buffer!==y.buffer){if((_>0||_+t<a.length)&&(a=a.subarray?a.subarray(_,_+t):Array.prototype.slice.call(a,_,_+t)),c=!0,!(n=ve()))throw new Pe.ErrnoError(48);y.set(a,n)}else c=!1,n=a.byteOffset;return{ptr:n,allocated:c}},msync:function(e,t,_,r,s){return he.stream_ops.write(e,t,0,r,_,!1),0}}},pe={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},ye={};var Pe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=oe.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Pe.ErrnoError(32);for(var _=e.split("/").filter((e=>!!e)),r=Pe.root,s="/",n=0;n<_.length;n++){var c=n===_.length-1;if(c&&t.parent)break;if(r=Pe.lookupNode(r,_[n]),s=ae.join2(s,_[n]),Pe.isMountpoint(r)&&(!c||c&&t.follow_mount)&&(r=r.mounted.root),!c||t.follow)for(var a=0;Pe.isLink(r.mode);){var i=Pe.readlink(s);if(s=oe.resolve(ae.dirname(s),i),r=Pe.lookupPath(s,{recurse_count:t.recurse_count+1}).node,a++>40)throw new Pe.ErrnoError(32)}}return{path:s,node:r}},getPath:e=>{for(var t;;){if(Pe.isRoot(e)){var _=e.mount.mountpoint;return t?"/"!==_[_.length-1]?_+"/"+t:_+t:_}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var _=0,r=0;r<t.length;r++)_=(_<<5)-_+t.charCodeAt(r)|0;return(e+_>>>0)%Pe.nameTable.length},hashAddNode:e=>{var t=Pe.hashName(e.parent.id,e.name);e.name_next=Pe.nameTable[t],Pe.nameTable[t]=e},hashRemoveNode:e=>{var t=Pe.hashName(e.parent.id,e.name);if(Pe.nameTable[t]===e)Pe.nameTable[t]=e.name_next;else for(var _=Pe.nameTable[t];_;){if(_.name_next===e){_.name_next=e.name_next;break}_=_.name_next}},lookupNode:(e,t)=>{var _=Pe.mayLookup(e);if(_)throw new Pe.ErrnoError(_,e);for(var r=Pe.hashName(e.id,t),s=Pe.nameTable[r];s;s=s.name_next){var n=s.name;if(s.parent.id===e.id&&n===t)return s}return Pe.lookup(e,t)},createNode:(e,t,_,r)=>{w("object"==typeof e);var s=new Pe.FSNode(e,t,_,r);return Pe.hashAddNode(s),s},destroyNode:e=>{Pe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=Pe.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Pe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>Pe.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return Pe.lookupNode(e,t),20}catch(e){}return Pe.nodePermissions(e,"wx")},mayDelete:(e,t,_)=>{var r;try{r=Pe.lookupNode(e,t)}catch(e){return e.errno}var s=Pe.nodePermissions(e,"wx");if(s)return s;if(_){if(!Pe.isDir(r.mode))return 54;if(Pe.isRoot(r)||Pe.getPath(r)===Pe.cwd())return 10}else if(Pe.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?Pe.isLink(e.mode)?32:Pe.isDir(e.mode)&&("r"!==Pe.flagsToPermissionString(t)||512&t)?31:Pe.nodePermissions(e,Pe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=Pe.MAX_OPEN_FDS)=>{for(var _=e;_<=t;_++)if(!Pe.streams[_])return _;throw new Pe.ErrnoError(33)},getStream:e=>Pe.streams[e],createStream:(e,t,_)=>{Pe.FSStream||(Pe.FSStream=function(){this.shared={}},Pe.FSStream.prototype={},Object.defineProperties(Pe.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new Pe.FSStream,e);var r=Pe.nextfd(t,_);return e.fd=r,Pe.streams[r]=e,e},closeStream:e=>{Pe.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=Pe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new Pe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{Pe.devices[e]={stream_ops:t}},getDevice:e=>Pe.devices[e],getMounts:e=>{for(var t=[],_=[e];_.length;){var r=_.pop();t.push(r),_.push.apply(_,r.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),Pe.syncFSRequests++,Pe.syncFSRequests>1&&u("warning: "+Pe.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var _=Pe.getMounts(Pe.root.mount),r=0;function s(e){return w(Pe.syncFSRequests>0),Pe.syncFSRequests--,t(e)}function n(e){if(e)return n.errored?void 0:(n.errored=!0,s(e));++r>=_.length&&s(null)}_.forEach((t=>{if(!t.type.syncfs)return n(null);t.type.syncfs(t,e,n)}))},mount:(e,t,_)=>{if("string"==typeof e)throw e;var r,s="/"===_,n=!_;if(s&&Pe.root)throw new Pe.ErrnoError(10);if(!s&&!n){var c=Pe.lookupPath(_,{follow_mount:!1});if(_=c.path,r=c.node,Pe.isMountpoint(r))throw new Pe.ErrnoError(10);if(!Pe.isDir(r.mode))throw new Pe.ErrnoError(54)}var a={type:e,opts:t,mountpoint:_,mounts:[]},i=e.mount(a);return i.mount=a,a.root=i,s?Pe.root=i:r&&(r.mounted=a,r.mount&&r.mount.mounts.push(a)),i},unmount:e=>{var t=Pe.lookupPath(e,{follow_mount:!1});if(!Pe.isMountpoint(t.node))throw new Pe.ErrnoError(28);var _=t.node,r=_.mounted,s=Pe.getMounts(r);Object.keys(Pe.nameTable).forEach((e=>{for(var t=Pe.nameTable[e];t;){var _=t.name_next;s.includes(t.mount)&&Pe.destroyNode(t),t=_}})),_.mounted=null;var n=_.mount.mounts.indexOf(r);w(-1!==n),_.mount.mounts.splice(n,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,_)=>{var r=Pe.lookupPath(e,{parent:!0}).node,s=ae.basename(e);if(!s||"."===s||".."===s)throw new Pe.ErrnoError(28);var n=Pe.mayCreate(r,s);if(n)throw new Pe.ErrnoError(n);if(!r.node_ops.mknod)throw new Pe.ErrnoError(63);return r.node_ops.mknod(r,s,t,_)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Pe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Pe.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var _=e.split("/"),r="",s=0;s<_.length;++s)if(_[s]){r+="/"+_[s];try{Pe.mkdir(r,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,_)=>(void 0===_&&(_=t,t=438),t|=8192,Pe.mknod(e,t,_)),symlink:(e,t)=>{if(!oe.resolve(e))throw new Pe.ErrnoError(44);var _=Pe.lookupPath(t,{parent:!0}).node;if(!_)throw new Pe.ErrnoError(44);var r=ae.basename(t),s=Pe.mayCreate(_,r);if(s)throw new Pe.ErrnoError(s);if(!_.node_ops.symlink)throw new Pe.ErrnoError(63);return _.node_ops.symlink(_,r,e)},rename:(e,t)=>{var _,r,s=ae.dirname(e),n=ae.dirname(t),c=ae.basename(e),a=ae.basename(t);if(_=Pe.lookupPath(e,{parent:!0}).node,r=Pe.lookupPath(t,{parent:!0}).node,!_||!r)throw new Pe.ErrnoError(44);if(_.mount!==r.mount)throw new Pe.ErrnoError(75);var i,o=Pe.lookupNode(_,c),l=oe.relative(e,n);if("."!==l.charAt(0))throw new Pe.ErrnoError(28);if("."!==(l=oe.relative(t,s)).charAt(0))throw new Pe.ErrnoError(55);try{i=Pe.lookupNode(r,a)}catch(e){}if(o!==i){var f=Pe.isDir(o.mode),d=Pe.mayDelete(_,c,f);if(d)throw new Pe.ErrnoError(d);if(d=i?Pe.mayDelete(r,a,f):Pe.mayCreate(r,a))throw new Pe.ErrnoError(d);if(!_.node_ops.rename)throw new Pe.ErrnoError(63);if(Pe.isMountpoint(o)||i&&Pe.isMountpoint(i))throw new Pe.ErrnoError(10);if(r!==_&&(d=Pe.nodePermissions(_,"w")))throw new Pe.ErrnoError(d);Pe.hashRemoveNode(o);try{_.node_ops.rename(o,r,a)}catch(e){throw e}finally{Pe.hashAddNode(o)}}},rmdir:e=>{var t=Pe.lookupPath(e,{parent:!0}).node,_=ae.basename(e),r=Pe.lookupNode(t,_),s=Pe.mayDelete(t,_,!0);if(s)throw new Pe.ErrnoError(s);if(!t.node_ops.rmdir)throw new Pe.ErrnoError(63);if(Pe.isMountpoint(r))throw new Pe.ErrnoError(10);t.node_ops.rmdir(t,_),Pe.destroyNode(r)},readdir:e=>{var t=Pe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Pe.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=Pe.lookupPath(e,{parent:!0}).node;if(!t)throw new Pe.ErrnoError(44);var _=ae.basename(e),r=Pe.lookupNode(t,_),s=Pe.mayDelete(t,_,!1);if(s)throw new Pe.ErrnoError(s);if(!t.node_ops.unlink)throw new Pe.ErrnoError(63);if(Pe.isMountpoint(r))throw new Pe.ErrnoError(10);t.node_ops.unlink(t,_),Pe.destroyNode(r)},readlink:e=>{var t=Pe.lookupPath(e).node;if(!t)throw new Pe.ErrnoError(44);if(!t.node_ops.readlink)throw new Pe.ErrnoError(28);return oe.resolve(Pe.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var _=Pe.lookupPath(e,{follow:!t}).node;if(!_)throw new Pe.ErrnoError(44);if(!_.node_ops.getattr)throw new Pe.ErrnoError(63);return _.node_ops.getattr(_)},lstat:e=>Pe.stat(e,!0),chmod:(e,t,_)=>{var r;if(!(r="string"==typeof e?Pe.lookupPath(e,{follow:!_}).node:e).node_ops.setattr)throw new Pe.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod:(e,t)=>{Pe.chmod(e,t,!0)},fchmod:(e,t)=>{var _=Pe.getStream(e);if(!_)throw new Pe.ErrnoError(8);Pe.chmod(_.node,t)},chown:(e,t,_,r)=>{var s;if(!(s="string"==typeof e?Pe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Pe.ErrnoError(63);s.node_ops.setattr(s,{timestamp:Date.now()})},lchown:(e,t,_)=>{Pe.chown(e,t,_,!0)},fchown:(e,t,_)=>{var r=Pe.getStream(e);if(!r)throw new Pe.ErrnoError(8);Pe.chown(r.node,t,_)},truncate:(e,t)=>{if(t<0)throw new Pe.ErrnoError(28);var _;if(!(_="string"==typeof e?Pe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Pe.ErrnoError(63);if(Pe.isDir(_.mode))throw new Pe.ErrnoError(31);if(!Pe.isFile(_.mode))throw new Pe.ErrnoError(28);var r=Pe.nodePermissions(_,"w");if(r)throw new Pe.ErrnoError(r);_.node_ops.setattr(_,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var _=Pe.getStream(e);if(!_)throw new Pe.ErrnoError(8);if(0==(2097155&_.flags))throw new Pe.ErrnoError(28);Pe.truncate(_.node,t)},utime:(e,t,_)=>{var r=Pe.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,_)})},open:(e,t,_)=>{if(""===e)throw new Pe.ErrnoError(44);var r;if(_=void 0===_?438:_,_=64&(t="string"==typeof t?Pe.modeStringToFlags(t):t)?4095&_|32768:0,"object"==typeof e)r=e;else{e=ae.normalize(e);try{r=Pe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var n=!1;if(64&t)if(r){if(128&t)throw new Pe.ErrnoError(20)}else r=Pe.mknod(e,_,0),n=!0;if(!r)throw new Pe.ErrnoError(44);if(Pe.isChrdev(r.mode)&&(t&=-513),65536&t&&!Pe.isDir(r.mode))throw new Pe.ErrnoError(54);if(!n){var c=Pe.mayOpen(r,t);if(c)throw new Pe.ErrnoError(c)}512&t&&!n&&Pe.truncate(r,0),t&=-131713;var a=Pe.createStream({node:r,path:Pe.getPath(r),flags:t,seekable:!0,position:0,stream_ops:r.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!s.logReadFiles||1&t||(Pe.readFiles||(Pe.readFiles={}),e in Pe.readFiles||(Pe.readFiles[e]=1)),a},close:e=>{if(Pe.isClosed(e))throw new Pe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Pe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,_)=>{if(Pe.isClosed(e))throw new Pe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Pe.ErrnoError(70);if(0!=_&&1!=_&&2!=_)throw new Pe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,_),e.ungotten=[],e.position},read:(e,t,_,r,s)=>{if(r<0||s<0)throw new Pe.ErrnoError(28);if(Pe.isClosed(e))throw new Pe.ErrnoError(8);if(1==(2097155&e.flags))throw new Pe.ErrnoError(8);if(Pe.isDir(e.node.mode))throw new Pe.ErrnoError(31);if(!e.stream_ops.read)throw new Pe.ErrnoError(28);var n=void 0!==s;if(n){if(!e.seekable)throw new Pe.ErrnoError(70)}else s=e.position;var c=e.stream_ops.read(e,t,_,r,s);return n||(e.position+=c),c},write:(e,t,_,r,s,n)=>{if(r<0||s<0)throw new Pe.ErrnoError(28);if(Pe.isClosed(e))throw new Pe.ErrnoError(8);if(0==(2097155&e.flags))throw new Pe.ErrnoError(8);if(Pe.isDir(e.node.mode))throw new Pe.ErrnoError(31);if(!e.stream_ops.write)throw new Pe.ErrnoError(28);e.seekable&&1024&e.flags&&Pe.llseek(e,0,2);var c=void 0!==s;if(c){if(!e.seekable)throw new Pe.ErrnoError(70)}else s=e.position;var a=e.stream_ops.write(e,t,_,r,s,n);return c||(e.position+=a),a},allocate:(e,t,_)=>{if(Pe.isClosed(e))throw new Pe.ErrnoError(8);if(t<0||_<=0)throw new Pe.ErrnoError(28);if(0==(2097155&e.flags))throw new Pe.ErrnoError(8);if(!Pe.isFile(e.node.mode)&&!Pe.isDir(e.node.mode))throw new Pe.ErrnoError(43);if(!e.stream_ops.allocate)throw new Pe.ErrnoError(138);e.stream_ops.allocate(e,t,_)},mmap:(e,t,_,r,s)=>{if(0!=(2&r)&&0==(2&s)&&2!=(2097155&e.flags))throw new Pe.ErrnoError(2);if(1==(2097155&e.flags))throw new Pe.ErrnoError(2);if(!e.stream_ops.mmap)throw new Pe.ErrnoError(43);return e.stream_ops.mmap(e,t,_,r,s)},msync:(e,t,_,r,s)=>e.stream_ops.msync?e.stream_ops.msync(e,t,_,r,s):0,munmap:e=>0,ioctl:(e,t,_)=>{if(!e.stream_ops.ioctl)throw new Pe.ErrnoError(59);return e.stream_ops.ioctl(e,t,_)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var _,r=Pe.open(e,t.flags),s=Pe.stat(e).size,n=new Uint8Array(s);return Pe.read(r,n,0,s,0),"utf8"===t.encoding?_=se(n,0):"binary"===t.encoding&&(_=n),Pe.close(r),_},writeFile:(e,t,_={})=>{_.flags=_.flags||577;var r=Pe.open(e,_.flags,_.mode);if("string"==typeof t){var s=new Uint8Array(le(t)+1),n=fe(t,s,0,s.length);Pe.write(r,s,0,n,void 0,_.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Pe.write(r,t,0,t.byteLength,void 0,_.canOwn)}Pe.close(r)},cwd:()=>Pe.currentPath,chdir:e=>{var t=Pe.lookupPath(e,{follow:!0});if(null===t.node)throw new Pe.ErrnoError(44);if(!Pe.isDir(t.node.mode))throw new Pe.ErrnoError(54);var _=Pe.nodePermissions(t.node,"x");if(_)throw new Pe.ErrnoError(_);Pe.currentPath=t.path},createDefaultDirectories:()=>{Pe.mkdir("/tmp"),Pe.mkdir("/home"),Pe.mkdir("/home/web_user")},createDefaultDevices:()=>{Pe.mkdir("/dev"),Pe.registerDevice(Pe.makedev(1,3),{read:()=>0,write:(e,t,_,r,s)=>r}),Pe.mkdev("/dev/null",Pe.makedev(1,3)),ue.register(Pe.makedev(5,0),ue.default_tty_ops),ue.register(Pe.makedev(6,0),ue.default_tty1_ops),Pe.mkdev("/dev/tty",Pe.makedev(5,0)),Pe.mkdev("/dev/tty1",Pe.makedev(6,0));var e=new Uint8Array(1024),t=0,_=()=>(0===t&&(t=ie(e).byteLength),e[--t]);Pe.createDevice("/dev","random",_),Pe.createDevice("/dev","urandom",_),Pe.mkdir("/dev/shm"),Pe.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Pe.mkdir("/proc");var e=Pe.mkdir("/proc/self");Pe.mkdir("/proc/self/fd"),Pe.mount({mount:()=>{var t=Pe.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var _=+t,r=Pe.getStream(_);if(!r)throw new Pe.ErrnoError(8);var s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>r.path}};return s.parent=s,s}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{s.stdin?Pe.createDevice("/dev","stdin",s.stdin):Pe.symlink("/dev/tty","/dev/stdin"),s.stdout?Pe.createDevice("/dev","stdout",null,s.stdout):Pe.symlink("/dev/tty","/dev/stdout"),s.stderr?Pe.createDevice("/dev","stderr",null,s.stderr):Pe.symlink("/dev/tty1","/dev/stderr");var e=Pe.open("/dev/stdin",0),t=Pe.open("/dev/stdout",1),_=Pe.open("/dev/stderr",1);w(0===e.fd,"invalid handle for stdin ("+e.fd+")"),w(1===t.fd,"invalid handle for stdout ("+t.fd+")"),w(2===_.fd,"invalid handle for stderr ("+_.fd+")")},ensureErrnoError:()=>{Pe.ErrnoError||(Pe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){for(var t in this.errno=e,ye)if(ye[t]===e){this.code=t;break}},this.setErrno(e),this.message=pe[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=function(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t,_=(t=e,_e("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),t);return e===_?e:_+" ["+e+"]"}))}(this.stack))},Pe.ErrnoError.prototype=new Error,Pe.ErrnoError.prototype.constructor=Pe.ErrnoError,[44].forEach((e=>{Pe.genericErrors[e]=new Pe.ErrnoError(e),Pe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{Pe.ensureErrnoError(),Pe.nameTable=new Array(4096),Pe.mount(he,{},"/"),Pe.createDefaultDirectories(),Pe.createDefaultDevices(),Pe.createSpecialDirectories(),Pe.filesystems={MEMFS:he}},init:(e,t,_)=>{w(!Pe.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Pe.init.initialized=!0,Pe.ensureErrnoError(),s.stdin=e||s.stdin,s.stdout=t||s.stdout,s.stderr=_||s.stderr,Pe.createStandardStreams()},quit:()=>{Pe.init.initialized=!1,Ae(0);for(var e=0;e<Pe.streams.length;e++){var t=Pe.streams[e];t&&Pe.close(t)}},getMode:(e,t)=>{var _=0;return e&&(_|=365),t&&(_|=146),_},findObject:(e,t)=>{var _=Pe.analyzePath(e,t);return _.exists?_.object:null},analyzePath:(e,t)=>{try{e=(r=Pe.lookupPath(e,{follow:!t})).path}catch(e){}var _={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=Pe.lookupPath(e,{parent:!0});_.parentExists=!0,_.parentPath=r.path,_.parentObject=r.node,_.name=ae.basename(e),r=Pe.lookupPath(e,{follow:!t}),_.exists=!0,_.path=r.path,_.object=r.node,_.name=r.node.name,_.isRoot="/"===r.path}catch(e){_.error=e.errno}return _},createPath:(e,t,_,r)=>{e="string"==typeof e?e:Pe.getPath(e);for(var s=t.split("/").reverse();s.length;){var n=s.pop();if(n){var c=ae.join2(e,n);try{Pe.mkdir(c)}catch(e){}e=c}}return c},createFile:(e,t,_,r,s)=>{var n=ae.join2("string"==typeof e?e:Pe.getPath(e),t),c=Pe.getMode(r,s);return Pe.create(n,c)},createDataFile:(e,t,_,r,s,n)=>{var c=t;e&&(e="string"==typeof e?e:Pe.getPath(e),c=t?ae.join2(e,t):e);var a=Pe.getMode(r,s),i=Pe.create(c,a);if(_){if("string"==typeof _){for(var o=new Array(_.length),l=0,f=_.length;l<f;++l)o[l]=_.charCodeAt(l);_=o}Pe.chmod(i,146|a);var d=Pe.open(i,577);Pe.write(d,_,0,_.length,0,n),Pe.close(d),Pe.chmod(i,a)}return i},createDevice:(e,t,_,r)=>{var s=ae.join2("string"==typeof e?e:Pe.getPath(e),t),n=Pe.getMode(!!_,!!r);Pe.createDevice.major||(Pe.createDevice.major=64);var c=Pe.makedev(Pe.createDevice.major++,0);return Pe.registerDevice(c,{open:e=>{e.seekable=!1},close:e=>{r&&r.buffer&&r.buffer.length&&r(10)},read:(e,t,r,s,n)=>{for(var c=0,a=0;a<s;a++){var i;try{i=_()}catch(e){throw new Pe.ErrnoError(29)}if(void 0===i&&0===c)throw new Pe.ErrnoError(6);if(null==i)break;c++,t[r+a]=i}return c&&(e.node.timestamp=Date.now()),c},write:(e,t,_,s,n)=>{for(var c=0;c<s;c++)try{r(t[_+c])}catch(e){throw new Pe.ErrnoError(29)}return s&&(e.node.timestamp=Date.now()),c}}),Pe.mkdev(s,n,c)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=de(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Pe.ErrnoError(29)}},createLazyFile:(e,t,_,r,s)=>{if("undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var n={isDevice:!1,url:_},c=Pe.createFile(e,t,n,r,s);n.contents?c.contents=n.contents:n.url&&(c.contents=null,c.url=n.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var a={};function i(e,t,_,r,s){var n=e.node.contents;if(s>=n.length)return 0;var c=Math.min(n.length-s,r);if(w(c>=0),n.slice)for(var a=0;a<c;a++)t[_+a]=n[s+a];else for(a=0;a<c;a++)t[_+a]=n.get(s+a);return c}return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];a[e]=function(){return Pe.forceLoadFile(c),t.apply(null,arguments)}})),a.read=(e,t,_,r,s)=>(Pe.forceLoadFile(c),i(e,t,_,r,s)),a.mmap=(e,t,_,r,s)=>{Pe.forceLoadFile(c);var n=ve();if(!n)throw new Pe.ErrnoError(48);return i(e,y,n,t,_),{ptr:n,allocated:!0}},c.stream_ops=a,c},createPreloadedFile:(e,t,_,r,s,n,c,a,o,l)=>{var f=t?oe.resolve(ae.join2(e,t)):e,d=D("cp "+f);function u(_){function i(_){l&&l(),a||Pe.createDataFile(e,t,_,r,s,o),n&&n(),M(d)}Browser.handledByPreloadPlugin(_,f,i,(()=>{c&&c(),M(d)}))||i(_)}U(d),"string"==typeof _?function(e,t,_,r){var s=D("al "+e);i(e,(t=>{w(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),(e=>{u(e)})(new Uint8Array(t)),s&&M(s)}),(t=>{if(!_)throw'Loading data file "'+e+'" failed.';_()})),s&&U(s)}(_,0,c):u(_)},absolutePath:()=>{B("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{B("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{B("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{B("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{B("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{B("FS.standardizePath has been removed; use PATH.normalize instead")}},me={DEFAULT_POLLMASK:5,calculateAt:function(e,t,_){if(ae.isAbs(t))return t;var r;if(r=-100===e?Pe.cwd():me.getStreamFromFD(e).path,0==t.length){if(!_)throw new Pe.ErrnoError(44);return r}return ae.join2(r,t)},doStat:function(e,t,_){try{var r=e(t)}catch(e){if(e&&e.node&&ae.normalize(t)!==ae.normalize(Pe.getPath(e.node)))return-54;throw e}g[_>>2]=r.dev,g[_+8>>2]=r.ino,g[_+12>>2]=r.mode,x[_+16>>2]=r.nlink,g[_+20>>2]=r.uid,g[_+24>>2]=r.gid,g[_+28>>2]=r.rdev,G=[r.size>>>0,(H=r.size,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],g[_+40>>2]=G[0],g[_+44>>2]=G[1],g[_+48>>2]=4096,g[_+52>>2]=r.blocks;var s=r.atime.getTime(),n=r.mtime.getTime(),c=r.ctime.getTime();return G=[Math.floor(s/1e3)>>>0,(H=Math.floor(s/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],g[_+56>>2]=G[0],g[_+60>>2]=G[1],x[_+64>>2]=s%1e3*1e3,G=[Math.floor(n/1e3)>>>0,(H=Math.floor(n/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],g[_+72>>2]=G[0],g[_+76>>2]=G[1],x[_+80>>2]=n%1e3*1e3,G=[Math.floor(c/1e3)>>>0,(H=Math.floor(c/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],g[_+88>>2]=G[0],g[_+92>>2]=G[1],x[_+96>>2]=c%1e3*1e3,G=[r.ino>>>0,(H=r.ino,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],g[_+104>>2]=G[0],g[_+108>>2]=G[1],0},doMsync:function(e,t,_,r,s){if(!Pe.isFile(t.node.mode))throw new Pe.ErrnoError(43);if(2&r)return 0;var n=P.slice(e,e+_);Pe.msync(t,n,s,_,r)},varargs:void 0,get:function(){return w(null!=me.varargs),me.varargs+=4,g[me.varargs-4>>2]},getStr:function(e){return ne(e)},getStreamFromFD:function(e){var t=Pe.getStream(e);if(!t)throw new Pe.ErrnoError(8);return t}},ge={};function xe(e){if(e instanceof Q||"unwind"==e)return p;N(),e instanceof WebAssembly.RuntimeError&&Se()<=0&&u("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 65536)"),c(1,e)}var ke;function Ee(e){if(E)u("user callback triggered after runtime exited or application aborted. Ignoring.");else try{e(),function(){if(!K())try{!function(e,t){if(p=e,function(){var e=d,t=u,_=!1;d=u=e=>{_=!0};try{Ae(0),["stdout","stderr"].forEach((function(e){var t=Pe.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,s=ue.ttys[r];s&&s.output&&s.output.length&&(_=!0)}}))}catch(e){}d=e,u=t,_&&_e("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}(),K()&&!t){var _="program exited (with status: "+e+"), but keepRuntimeAlive() is set (counter="+F+") due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)";r(_),u(_)}var n;p=n=e,K()||(s.onExit&&s.onExit(n),E=!0),c(n,new Q(n))}(p)}catch(e){xe(e)}}()}catch(e){xe(e)}}function we(e){var t=v.buffer;try{return v.grow(e-t.byteLength+65535>>>16),b(),1}catch(_){u("emscripten_realloc_buffer: Attempted to grow heap from "+t.byteLength+" bytes to "+e+" bytes, but got error: "+_)}}ke=()=>performance.now();var be=function(e,t,_,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Pe.nextInode++,this.name=t,this.mode=_,this.node_ops={},this.stream_ops={},this.rdev=r};Object.defineProperties(be.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return Pe.isDir(this.mode)}},isDevice:{get:function(){return Pe.isChrdev(this.mode)}}}),Pe.FSNode=be,Pe.staticInit(),ye={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Ne={__assert_fail:function(e,t,_,r){B("Assertion failed: "+ne(e)+", at: "+[t?ne(t):"unknown filename",_,r?ne(r):"unknown function"])},__call_sighandler:function(e,t){var _,r;((r=ce[_=e])||(_>=ce.length&&(ce.length=_+1),ce[_]=r=k.get(_)),w(k.get(_)==r,"JavaScript-side Wasm function table mirror is out of date!"),r)(t)},__syscall_fcntl64:function(e,t,_){me.varargs=_;try{var r=me.getStreamFromFD(e);switch(t){case 0:return(s=me.get())<0?-28:Pe.createStream(r,s).fd;case 1:case 2:case 6:case 7:return 0;case 3:return r.flags;case 4:var s=me.get();return r.flags|=s,0;case 5:return s=me.get(),m[s+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return 28,g[Ie()>>2]=28,-1}}catch(e){if(void 0===Pe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ioctl:function(e,t,_){me.varargs=_;try{var r=me.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return r.tty?0:-59;case 21519:if(!r.tty)return-59;var s=me.get();return g[s>>2]=0,0;case 21520:return r.tty?-28:-59;case 21531:return s=me.get(),Pe.ioctl(r,t,s);default:return-28}}catch(e){if(void 0===Pe||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,_,r){me.varargs=r;try{t=me.getStr(t),t=me.calculateAt(e,t);var s=r?me.get():0;return Pe.open(t,_,s).fd}catch(e){if(void 0===Pe||"ErrnoError"!==e.name)throw e;return-e.errno}},_setitimer_js:function(e,t){if(ge[e]&&(clearTimeout(ge[e].id),delete ge[e]),!t)return 0;var _=setTimeout((()=>{w(e in ge),delete ge[e],Ee((()=>Ce(e,ke())))}),t);return ge[e]={id:_,timeout_ms:t},0},abort:function(){B("native code called abort()")},emscripten_date_now:function(){return Date.now()},emscripten_memcpy_big:function(e,t,_){P.copyWithin(e,t,t+_)},emscripten_resize_heap:function(e){var t=P.length;w((e>>>=0)>t);var _,r=2147483648;if(e>r)return u("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+r+" bytes!"),!1;for(var s=1;s<=4;s*=2){var n=t*(1+.2/s);n=Math.min(n,e+100663296);var c=Math.min(r,(_=Math.max(e,n))+(65536-_%65536)%65536);if(we(c))return!0}return u("Failed to grow the heap from "+t+" bytes to "+c+" bytes, not enough memory!"),!1},fd_close:function(e){try{var t=me.getStreamFromFD(e);return Pe.close(t),0}catch(e){if(void 0===Pe||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,_,r){try{var s=function(e,t,_,r){for(var s=0,n=0;n<_;n++){var c=x[t>>2],a=x[t+4>>2];t+=8;var i=Pe.read(e,y,c,a,r);if(i<0)return-1;if(s+=i,i<a)break;void 0!==r&&(r+=i)}return s}(me.getStreamFromFD(e),t,_);return x[r>>2]=s,0}catch(e){if(void 0===Pe||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,_,r,s){try{var n=(i=_,w((a=t)==a>>>0||a==(0|a)),w(i===(0|i)),i+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*i:NaN);if(isNaN(n))return 61;var c=me.getStreamFromFD(e);return Pe.llseek(c,n,r),G=[c.position>>>0,(H=c.position,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],g[s>>2]=G[0],g[s+4>>2]=G[1],c.getdents&&0===n&&0===r&&(c.getdents=null),0}catch(e){if(void 0===Pe||"ErrnoError"!==e.name)throw e;return e.errno}var a,i},fd_write:function(e,t,_,r){try{var s=function(e,t,_,r){for(var s=0,n=0;n<_;n++){var c=x[t>>2],a=x[t+4>>2];t+=8;var i=Pe.write(e,y,c,a,r);if(i<0)return-1;s+=i,void 0!==r&&(r+=i)}return s}(me.getStreamFromFD(e),t,_);return x[r>>2]=s,0}catch(e){if(void 0===Pe||"ErrnoError"!==e.name)throw e;return e.errno}}};!function(){var e={env:Ne,wasi_snapshot_preview1:Ne};function t(e,t){var _,r=e.exports;return s.asm=r,w(v=s.asm.memory,"memory not found in wasm exports"),b(),w(k=s.asm.__indirect_function_table,"table not found in wasm exports"),_=s.asm.__wasm_call_ctors,A.unshift(_),M("wasm-instantiate"),r}U("wasm-instantiate");var _,n,c,a,i=s;if(s.instantiateWasm)try{return s.instantiateWasm(e,t)}catch(e){u("Module.instantiateWasm callback failed with error: "+e),r(e)}(_=f,n=O,c=e,a=function(e){w(s===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)},_||"function"!=typeof WebAssembly.instantiateStreaming||W(n)||"function"!=typeof fetch?q(n,c,a):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,c).then(a,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),q(n,c,a)}))))).catch(r)}(),s._vscf_impl_api=X("vscf_impl_api"),s._vscf_impl_tag=X("vscf_impl_tag"),s._vscf_impl_shallow_copy=X("vscf_impl_shallow_copy"),s._vscf_aes256_cbc_alg_id=X("vscf_aes256_cbc_alg_id"),s._vscf_aes256_cbc_produce_alg_info=X("vscf_aes256_cbc_produce_alg_info"),s._vscf_aes256_cbc_restore_alg_info=X("vscf_aes256_cbc_restore_alg_info"),s._vscf_aes256_cbc_set_nonce=X("vscf_aes256_cbc_set_nonce"),s._vscf_aes256_cbc_encrypt=X("vscf_aes256_cbc_encrypt"),s._vscf_aes256_cbc_encrypted_len=X("vscf_aes256_cbc_encrypted_len"),s._vscf_aes256_cbc_start_encryption=X("vscf_aes256_cbc_start_encryption"),s._vscf_aes256_cbc_update=X("vscf_aes256_cbc_update"),s._vscf_aes256_cbc_finish=X("vscf_aes256_cbc_finish"),s._vscf_aes256_cbc_out_len=X("vscf_aes256_cbc_out_len"),s._vscf_aes256_cbc_precise_encrypted_len=X("vscf_aes256_cbc_precise_encrypted_len"),s._vscf_aes256_cbc_decrypt=X("vscf_aes256_cbc_decrypt"),s._vscf_aes256_cbc_decrypted_len=X("vscf_aes256_cbc_decrypted_len"),s._vscf_aes256_cbc_start_decryption=X("vscf_aes256_cbc_start_decryption"),s._vscf_aes256_cbc_set_key=X("vscf_aes256_cbc_set_key"),s._vscf_aes256_cbc_state=X("vscf_aes256_cbc_state"),s._vscf_aes256_cbc_decrypted_out_len=X("vscf_aes256_cbc_decrypted_out_len"),s._vscf_aes256_cbc_encrypted_out_len=X("vscf_aes256_cbc_encrypted_out_len"),s._vscf_aes256_cbc_new=X("vscf_aes256_cbc_new"),s._vscf_aes256_cbc_delete=X("vscf_aes256_cbc_delete"),s._vscf_aes256_cbc_shallow_copy=X("vscf_aes256_cbc_shallow_copy"),s._vscf_aes256_gcm_out_len=X("vscf_aes256_gcm_out_len"),s._vscf_aes256_gcm_decrypted_out_len=X("vscf_aes256_gcm_decrypted_out_len"),s._vscf_aes256_gcm_encrypted_out_len=X("vscf_aes256_gcm_encrypted_out_len"),s._vscf_aes256_gcm_alg_id=X("vscf_aes256_gcm_alg_id"),s._vscf_aes256_gcm_produce_alg_info=X("vscf_aes256_gcm_produce_alg_info"),s._vscf_aes256_gcm_restore_alg_info=X("vscf_aes256_gcm_restore_alg_info"),s._vscf_aes256_gcm_set_nonce=X("vscf_aes256_gcm_set_nonce"),s._vscf_aes256_gcm_encrypt=X("vscf_aes256_gcm_encrypt"),s._vscf_aes256_gcm_encrypted_len=X("vscf_aes256_gcm_encrypted_len"),s._vscf_aes256_gcm_start_encryption=X("vscf_aes256_gcm_start_encryption"),s._vscf_aes256_gcm_update=X("vscf_aes256_gcm_update"),s._vscf_aes256_gcm_finish=X("vscf_aes256_gcm_finish"),s._vscf_aes256_gcm_finish_auth_decryption=X("vscf_aes256_gcm_finish_auth_decryption"),s._vscf_aes256_gcm_finish_auth_encryption=X("vscf_aes256_gcm_finish_auth_encryption"),s._vscf_aes256_gcm_precise_encrypted_len=X("vscf_aes256_gcm_precise_encrypted_len"),s._vscf_aes256_gcm_decrypt=X("vscf_aes256_gcm_decrypt"),s._vscf_aes256_gcm_decrypted_len=X("vscf_aes256_gcm_decrypted_len"),s._vscf_aes256_gcm_start_decryption=X("vscf_aes256_gcm_start_decryption"),s._vscf_aes256_gcm_set_key=X("vscf_aes256_gcm_set_key"),s._vscf_aes256_gcm_state=X("vscf_aes256_gcm_state"),s._vscf_aes256_gcm_auth_encrypt=X("vscf_aes256_gcm_auth_encrypt"),s._vscf_aes256_gcm_auth_encrypted_len=X("vscf_aes256_gcm_auth_encrypted_len"),s._vscf_aes256_gcm_set_auth_data=X("vscf_aes256_gcm_set_auth_data"),s._vscf_aes256_gcm_auth_decrypt=X("vscf_aes256_gcm_auth_decrypt"),s._vscf_aes256_gcm_auth_decrypted_len=X("vscf_aes256_gcm_auth_decrypted_len"),s._vscf_aes256_gcm_new=X("vscf_aes256_gcm_new"),s._vscf_aes256_gcm_delete=X("vscf_aes256_gcm_delete"),s._vscf_aes256_gcm_shallow_copy=X("vscf_aes256_gcm_shallow_copy"),s._vscf_alg_info_der_deserializer_setup_defaults=X("vscf_alg_info_der_deserializer_setup_defaults"),s._vscf_alg_info_der_deserializer_deserialize_inplace=X("vscf_alg_info_der_deserializer_deserialize_inplace"),s._vscf_alg_info_der_deserializer_deserialize=X("vscf_alg_info_der_deserializer_deserialize"),s._vscf_alg_info_der_deserializer_release_asn1_reader=X("vscf_alg_info_der_deserializer_release_asn1_reader"),s._vscf_alg_info_der_deserializer_new=X("vscf_alg_info_der_deserializer_new"),s._vscf_alg_info_der_deserializer_delete=X("vscf_alg_info_der_deserializer_delete"),s._vscf_alg_info_der_deserializer_shallow_copy=X("vscf_alg_info_der_deserializer_shallow_copy"),s._vscf_alg_info_der_deserializer_use_asn1_reader=X("vscf_alg_info_der_deserializer_use_asn1_reader"),s._vscf_alg_info_der_serializer_setup_defaults=X("vscf_alg_info_der_serializer_setup_defaults"),s._vscf_alg_info_der_serializer_serialize_inplace=X("vscf_alg_info_der_serializer_serialize_inplace"),s._vscf_alg_info_der_serializer_serialized_len=X("vscf_alg_info_der_serializer_serialized_len"),s._vscf_alg_info_der_serializer_serialize=X("vscf_alg_info_der_serializer_serialize"),s._vscf_alg_info_der_serializer_release_asn1_writer=X("vscf_alg_info_der_serializer_release_asn1_writer"),s._vscf_alg_info_der_serializer_new=X("vscf_alg_info_der_serializer_new"),s._vscf_alg_info_der_serializer_delete=X("vscf_alg_info_der_serializer_delete"),s._vscf_alg_info_der_serializer_shallow_copy=X("vscf_alg_info_der_serializer_shallow_copy"),s._vscf_alg_info_der_serializer_use_asn1_writer=X("vscf_alg_info_der_serializer_use_asn1_writer"),s._vscf_asn1rd_reset=X("vscf_asn1rd_reset"),s._vscf_asn1rd_left_len=X("vscf_asn1rd_left_len"),s._vscf_asn1rd_has_error=X("vscf_asn1rd_has_error"),s._vscf_asn1rd_status=X("vscf_asn1rd_status"),s._vscf_asn1rd_get_tag=X("vscf_asn1rd_get_tag"),s._vscf_asn1rd_get_len=X("vscf_asn1rd_get_len"),s._vscf_asn1rd_get_data_len=X("vscf_asn1rd_get_data_len"),s._vscf_asn1rd_read_tag=X("vscf_asn1rd_read_tag"),s._vscf_asn1rd_read_context_tag=X("vscf_asn1rd_read_context_tag"),s._vscf_asn1rd_read_int=X("vscf_asn1rd_read_int"),s._vscf_asn1rd_read_int64=X("vscf_asn1rd_read_int64"),s._vscf_asn1rd_read_int8=X("vscf_asn1rd_read_int8"),s._vscf_asn1rd_read_int16=X("vscf_asn1rd_read_int16"),s._vscf_asn1rd_read_int32=X("vscf_asn1rd_read_int32"),s._vscf_asn1rd_read_uint=X("vscf_asn1rd_read_uint"),s._vscf_asn1rd_read_uint64=X("vscf_asn1rd_read_uint64"),s._vscf_asn1rd_read_uint8=X("vscf_asn1rd_read_uint8"),s._vscf_asn1rd_read_uint16=X("vscf_asn1rd_read_uint16"),s._vscf_asn1rd_read_uint32=X("vscf_asn1rd_read_uint32"),s._vscf_asn1rd_read_bool=X("vscf_asn1rd_read_bool"),s._vscf_asn1rd_read_null=X("vscf_asn1rd_read_null"),s._vscf_asn1rd_read_null_optional=X("vscf_asn1rd_read_null_optional"),s._vscf_asn1rd_read_octet_str=X("vscf_asn1rd_read_octet_str"),s._vscf_asn1rd_read_bitstring_as_octet_str=X("vscf_asn1rd_read_bitstring_as_octet_str"),s._vscf_asn1rd_read_utf8_str=X("vscf_asn1rd_read_utf8_str"),s._vscf_asn1rd_read_oid=X("vscf_asn1rd_read_oid"),s._vscf_asn1rd_read_data=X("vscf_asn1rd_read_data"),s._vscf_asn1rd_read_sequence=X("vscf_asn1rd_read_sequence"),s._vscf_asn1rd_read_set=X("vscf_asn1rd_read_set"),s._vscf_asn1rd_new=X("vscf_asn1rd_new"),s._vscf_asn1rd_delete=X("vscf_asn1rd_delete"),s._vscf_asn1rd_shallow_copy=X("vscf_asn1rd_shallow_copy"),s._vscf_asn1wr_reset=X("vscf_asn1wr_reset"),s._vscf_asn1wr_finish=X("vscf_asn1wr_finish"),s._vscf_asn1wr_bytes=X("vscf_asn1wr_bytes"),s._vscf_asn1wr_len=X("vscf_asn1wr_len"),s._vscf_asn1wr_written_len=X("vscf_asn1wr_written_len"),s._vscf_asn1wr_unwritten_len=X("vscf_asn1wr_unwritten_len"),s._vscf_asn1wr_has_error=X("vscf_asn1wr_has_error"),s._vscf_asn1wr_status=X("vscf_asn1wr_status"),s._vscf_asn1wr_reserve=X("vscf_asn1wr_reserve"),s._vscf_asn1wr_write_tag=X("vscf_asn1wr_write_tag"),s._vscf_asn1wr_write_context_tag=X("vscf_asn1wr_write_context_tag"),s._vscf_asn1wr_write_len=X("vscf_asn1wr_write_len"),s._vscf_asn1wr_write_int=X("vscf_asn1wr_write_int"),s._vscf_asn1wr_write_int64=X("vscf_asn1wr_write_int64"),s._vscf_asn1wr_write_int8=X("vscf_asn1wr_write_int8"),s._vscf_asn1wr_write_int16=X("vscf_asn1wr_write_int16"),s._vscf_asn1wr_write_int32=X("vscf_asn1wr_write_int32"),s._vscf_asn1wr_write_uint=X("vscf_asn1wr_write_uint"),s._vscf_asn1wr_write_uint64=X("vscf_asn1wr_write_uint64"),s._vscf_asn1wr_write_uint8=X("vscf_asn1wr_write_uint8"),s._vscf_asn1wr_write_uint16=X("vscf_asn1wr_write_uint16"),s._vscf_asn1wr_write_uint32=X("vscf_asn1wr_write_uint32"),s._vscf_asn1wr_write_bool=X("vscf_asn1wr_write_bool"),s._vscf_asn1wr_write_null=X("vscf_asn1wr_write_null"),s._vscf_asn1wr_write_octet_str=X("vscf_asn1wr_write_octet_str"),s._vscf_asn1wr_write_data=X("vscf_asn1wr_write_data"),s._vscf_asn1wr_write_octet_str_as_bitstring=X("vscf_asn1wr_write_octet_str_as_bitstring"),s._vscf_asn1wr_write_utf8_str=X("vscf_asn1wr_write_utf8_str"),s._vscf_asn1wr_write_oid=X("vscf_asn1wr_write_oid"),s._vscf_asn1wr_write_sequence=X("vscf_asn1wr_write_sequence"),s._vscf_asn1wr_write_set=X("vscf_asn1wr_write_set"),s._vscf_asn1wr_new=X("vscf_asn1wr_new"),s._vscf_asn1wr_delete=X("vscf_asn1wr_delete"),s._vscf_asn1wr_shallow_copy=X("vscf_asn1wr_shallow_copy"),s._vscf_cipher_alg_info_nonce=X("vscf_cipher_alg_info_nonce"),s._vscf_cipher_alg_info_alg_id=X("vscf_cipher_alg_info_alg_id"),s._vscf_cipher_alg_info_new=X("vscf_cipher_alg_info_new"),s._vscf_cipher_alg_info_delete=X("vscf_cipher_alg_info_delete"),s._vscf_cipher_alg_info_shallow_copy=X("vscf_cipher_alg_info_shallow_copy"),s._vscf_cipher_alg_info_new_with_members=X("vscf_cipher_alg_info_new_with_members"),s._vscf_compound_key_alg_setup_defaults=X("vscf_compound_key_alg_setup_defaults"),s._vscf_compound_key_alg_make_key=X("vscf_compound_key_alg_make_key"),s._vscf_compound_key_alg_alg_id=X("vscf_compound_key_alg_alg_id"),s._vscf_compound_key_alg_produce_alg_info=X("vscf_compound_key_alg_produce_alg_info"),s._vscf_compound_key_alg_restore_alg_info=X("vscf_compound_key_alg_restore_alg_info"),s._vscf_compound_key_alg_generate_ephemeral_key=X("vscf_compound_key_alg_generate_ephemeral_key"),s._vscf_compound_key_alg_import_public_key=X("vscf_compound_key_alg_import_public_key"),s._vscf_compound_key_alg_import_public_key_data=X("vscf_compound_key_alg_import_public_key_data"),s._vscf_compound_key_alg_export_public_key=X("vscf_compound_key_alg_export_public_key"),s._vscf_compound_key_alg_exported_public_key_data_len=X("vscf_compound_key_alg_exported_public_key_data_len"),s._vscf_compound_key_alg_export_public_key_data=X("vscf_compound_key_alg_export_public_key_data"),s._vscf_compound_key_alg_import_private_key=X("vscf_compound_key_alg_import_private_key"),s._vscf_compound_key_alg_import_private_key_data=X("vscf_compound_key_alg_import_private_key_data"),s._vscf_compound_key_alg_export_private_key=X("vscf_compound_key_alg_export_private_key"),s._vscf_compound_key_alg_exported_private_key_data_len=X("vscf_compound_key_alg_exported_private_key_data_len"),s._vscf_compound_key_alg_export_private_key_data=X("vscf_compound_key_alg_export_private_key_data"),s._vscf_compound_key_alg_can_encrypt=X("vscf_compound_key_alg_can_encrypt"),s._vscf_compound_key_alg_encrypted_len=X("vscf_compound_key_alg_encrypted_len"),s._vscf_compound_key_alg_encrypt=X("vscf_compound_key_alg_encrypt"),s._vscf_compound_key_alg_can_decrypt=X("vscf_compound_key_alg_can_decrypt"),s._vscf_compound_key_alg_decrypted_len=X("vscf_compound_key_alg_decrypted_len"),s._vscf_compound_key_alg_decrypt=X("vscf_compound_key_alg_decrypt"),s._vscf_compound_key_alg_can_sign=X("vscf_compound_key_alg_can_sign"),s._vscf_compound_key_alg_signature_len=X("vscf_compound_key_alg_signature_len"),s._vscf_compound_key_alg_sign_hash=X("vscf_compound_key_alg_sign_hash"),s._vscf_compound_key_alg_can_verify=X("vscf_compound_key_alg_can_verify"),s._vscf_compound_key_alg_verify_hash=X("vscf_compound_key_alg_verify_hash"),s._vscf_compound_key_alg_release_random=X("vscf_compound_key_alg_release_random"),s._vscf_compound_key_alg_new=X("vscf_compound_key_alg_new"),s._vscf_compound_key_alg_delete=X("vscf_compound_key_alg_delete"),s._vscf_compound_key_alg_shallow_copy=X("vscf_compound_key_alg_shallow_copy"),s._vscf_compound_key_alg_use_random=X("vscf_compound_key_alg_use_random"),s._vscf_compound_key_alg_info_cipher_alg_info=X("vscf_compound_key_alg_info_cipher_alg_info"),s._vscf_compound_key_alg_info_signer_alg_info=X("vscf_compound_key_alg_info_signer_alg_info"),s._vscf_compound_key_alg_info_alg_id=X("vscf_compound_key_alg_info_alg_id"),s._vscf_compound_key_alg_info_new=X("vscf_compound_key_alg_info_new"),s._vscf_compound_key_alg_info_delete=X("vscf_compound_key_alg_info_delete"),s._vscf_compound_key_alg_info_shallow_copy=X("vscf_compound_key_alg_info_shallow_copy"),s._vscf_compound_private_key_cipher_key=X("vscf_compound_private_key_cipher_key"),s._vscf_compound_private_key_signer_key=X("vscf_compound_private_key_signer_key"),s._vscf_compound_private_key_alg_id=X("vscf_compound_private_key_alg_id"),s._vscf_compound_private_key_alg_info=X("vscf_compound_private_key_alg_info"),s._vscf_compound_private_key_len=X("vscf_compound_private_key_len"),s._vscf_compound_private_key_bitlen=X("vscf_compound_private_key_bitlen"),s._vscf_compound_private_key_impl_tag=X("vscf_compound_private_key_impl_tag"),s._vscf_compound_private_key_is_valid=X("vscf_compound_private_key_is_valid"),s._vscf_compound_private_key_extract_public_key=X("vscf_compound_private_key_extract_public_key"),s._vscf_compound_private_key_new=X("vscf_compound_private_key_new"),s._vscf_compound_private_key_delete=X("vscf_compound_private_key_delete"),s._vscf_compound_private_key_shallow_copy=X("vscf_compound_private_key_shallow_copy"),s._vscf_compound_public_key_cipher_key=X("vscf_compound_public_key_cipher_key"),s._vscf_compound_public_key_signer_key=X("vscf_compound_public_key_signer_key"),s._vscf_compound_public_key_alg_id=X("vscf_compound_public_key_alg_id"),s._vscf_compound_public_key_alg_info=X("vscf_compound_public_key_alg_info"),s._vscf_compound_public_key_len=X("vscf_compound_public_key_len"),s._vscf_compound_public_key_bitlen=X("vscf_compound_public_key_bitlen"),s._vscf_compound_public_key_impl_tag=X("vscf_compound_public_key_impl_tag"),s._vscf_compound_public_key_is_valid=X("vscf_compound_public_key_is_valid"),s._vscf_compound_public_key_new=X("vscf_compound_public_key_new"),s._vscf_compound_public_key_delete=X("vscf_compound_public_key_delete"),s._vscf_compound_public_key_shallow_copy=X("vscf_compound_public_key_shallow_copy"),s._vscf_ctr_drbg_setup_defaults=X("vscf_ctr_drbg_setup_defaults"),s._vscf_ctr_drbg_enable_prediction_resistance=X("vscf_ctr_drbg_enable_prediction_resistance"),s._vscf_ctr_drbg_set_reseed_interval=X("vscf_ctr_drbg_set_reseed_interval"),s._vscf_ctr_drbg_set_entropy_len=X("vscf_ctr_drbg_set_entropy_len"),s._vscf_ctr_drbg_random=X("vscf_ctr_drbg_random"),s._vscf_ctr_drbg_reseed=X("vscf_ctr_drbg_reseed"),s._vscf_ctr_drbg_release_entropy_source=X("vscf_ctr_drbg_release_entropy_source"),s._vscf_ctr_drbg_new=X("vscf_ctr_drbg_new"),s._vscf_ctr_drbg_delete=X("vscf_ctr_drbg_delete"),s._vscf_ctr_drbg_shallow_copy=X("vscf_ctr_drbg_shallow_copy"),s._vscf_ctr_drbg_use_entropy_source=X("vscf_ctr_drbg_use_entropy_source"),s._vscf_curve25519_setup_defaults=X("vscf_curve25519_setup_defaults"),s._vscf_curve25519_generate_key=X("vscf_curve25519_generate_key"),s._vscf_curve25519_generate_ephemeral_key=X("vscf_curve25519_generate_ephemeral_key"),s._vscf_curve25519_import_public_key=X("vscf_curve25519_import_public_key"),s._vscf_curve25519_import_public_key_data=X("vscf_curve25519_import_public_key_data"),s._vscf_curve25519_export_public_key=X("vscf_curve25519_export_public_key"),s._vscf_curve25519_exported_public_key_data_len=X("vscf_curve25519_exported_public_key_data_len"),s._vscf_curve25519_export_public_key_data=X("vscf_curve25519_export_public_key_data"),s._vscf_curve25519_import_private_key=X("vscf_curve25519_import_private_key"),s._vscf_curve25519_import_private_key_data=X("vscf_curve25519_import_private_key_data"),s._vscf_curve25519_export_private_key=X("vscf_curve25519_export_private_key"),s._vscf_curve25519_exported_private_key_data_len=X("vscf_curve25519_exported_private_key_data_len"),s._vscf_curve25519_export_private_key_data=X("vscf_curve25519_export_private_key_data"),s._vscf_curve25519_can_encrypt=X("vscf_curve25519_can_encrypt"),s._vscf_curve25519_encrypted_len=X("vscf_curve25519_encrypted_len"),s._vscf_curve25519_encrypt=X("vscf_curve25519_encrypt"),s._vscf_curve25519_can_decrypt=X("vscf_curve25519_can_decrypt"),s._vscf_curve25519_decrypted_len=X("vscf_curve25519_decrypted_len"),s._vscf_curve25519_decrypt=X("vscf_curve25519_decrypt"),s._vscf_curve25519_compute_shared_key=X("vscf_curve25519_compute_shared_key"),s._vscf_curve25519_shared_key_len=X("vscf_curve25519_shared_key_len"),s._vscf_curve25519_kem_shared_key_len=X("vscf_curve25519_kem_shared_key_len"),s._vscf_curve25519_kem_encapsulated_key_len=X("vscf_curve25519_kem_encapsulated_key_len"),s._vscf_curve25519_kem_encapsulate=X("vscf_curve25519_kem_encapsulate"),s._vscf_curve25519_kem_decapsulate=X("vscf_curve25519_kem_decapsulate"),s._vscf_curve25519_release_random=X("vscf_curve25519_release_random"),s._vscf_curve25519_release_ecies=X("vscf_curve25519_release_ecies"),s._vscf_curve25519_new=X("vscf_curve25519_new"),s._vscf_curve25519_delete=X("vscf_curve25519_delete"),s._vscf_curve25519_shallow_copy=X("vscf_curve25519_shallow_copy"),s._vscf_curve25519_use_random=X("vscf_curve25519_use_random"),s._vscf_curve25519_use_ecies=X("vscf_curve25519_use_ecies"),s._vscf_ecc_setup_defaults=X("vscf_ecc_setup_defaults"),s._vscf_ecc_generate_key=X("vscf_ecc_generate_key"),s._vscf_ecc_generate_ephemeral_key=X("vscf_ecc_generate_ephemeral_key"),s._vscf_ecc_import_public_key=X("vscf_ecc_import_public_key"),s._vscf_ecc_import_public_key_data=X("vscf_ecc_import_public_key_data"),s._vscf_ecc_export_public_key=X("vscf_ecc_export_public_key"),s._vscf_ecc_exported_public_key_data_len=X("vscf_ecc_exported_public_key_data_len"),s._vscf_ecc_export_public_key_data=X("vscf_ecc_export_public_key_data"),s._vscf_ecc_import_private_key=X("vscf_ecc_import_private_key"),s._vscf_ecc_import_private_key_data=X("vscf_ecc_import_private_key_data"),s._vscf_ecc_export_private_key=X("vscf_ecc_export_private_key"),s._vscf_ecc_exported_private_key_data_len=X("vscf_ecc_exported_private_key_data_len"),s._vscf_ecc_export_private_key_data=X("vscf_ecc_export_private_key_data"),s._vscf_ecc_can_encrypt=X("vscf_ecc_can_encrypt"),s._vscf_ecc_encrypted_len=X("vscf_ecc_encrypted_len"),s._vscf_ecc_encrypt=X("vscf_ecc_encrypt"),s._vscf_ecc_can_decrypt=X("vscf_ecc_can_decrypt"),s._vscf_ecc_decrypted_len=X("vscf_ecc_decrypted_len"),s._vscf_ecc_decrypt=X("vscf_ecc_decrypt"),s._vscf_ecc_can_sign=X("vscf_ecc_can_sign"),s._vscf_ecc_signature_len=X("vscf_ecc_signature_len"),s._vscf_ecc_sign_hash=X("vscf_ecc_sign_hash"),s._vscf_ecc_can_verify=X("vscf_ecc_can_verify"),s._vscf_ecc_verify_hash=X("vscf_ecc_verify_hash"),s._vscf_ecc_compute_shared_key=X("vscf_ecc_compute_shared_key"),s._vscf_ecc_shared_key_len=X("vscf_ecc_shared_key_len"),s._vscf_ecc_kem_shared_key_len=X("vscf_ecc_kem_shared_key_len"),s._vscf_ecc_kem_encapsulated_key_len=X("vscf_ecc_kem_encapsulated_key_len"),s._vscf_ecc_kem_encapsulate=X("vscf_ecc_kem_encapsulate"),s._vscf_ecc_kem_decapsulate=X("vscf_ecc_kem_decapsulate"),s._vscf_ecc_release_random=X("vscf_ecc_release_random"),s._vscf_ecc_release_ecies=X("vscf_ecc_release_ecies"),s._vscf_ecc_new=X("vscf_ecc_new"),s._vscf_ecc_delete=X("vscf_ecc_delete"),s._vscf_ecc_shallow_copy=X("vscf_ecc_shallow_copy"),s._vscf_ecc_use_random=X("vscf_ecc_use_random"),s._vscf_ecc_use_ecies=X("vscf_ecc_use_ecies"),s._vscf_ecc_alg_info_key_id=X("vscf_ecc_alg_info_key_id"),s._vscf_ecc_alg_info_domain_id=X("vscf_ecc_alg_info_domain_id"),s._vscf_ecc_alg_info_alg_id=X("vscf_ecc_alg_info_alg_id"),s._vscf_ecc_alg_info_new=X("vscf_ecc_alg_info_new"),s._vscf_ecc_alg_info_delete=X("vscf_ecc_alg_info_delete"),s._vscf_ecc_alg_info_shallow_copy=X("vscf_ecc_alg_info_shallow_copy"),s._vscf_ecc_alg_info_new_with_members=X("vscf_ecc_alg_info_new_with_members"),s._vscf_ecc_private_key_alg_id=X("vscf_ecc_private_key_alg_id"),s._vscf_ecc_private_key_alg_info=X("vscf_ecc_private_key_alg_info"),s._vscf_ecc_private_key_len=X("vscf_ecc_private_key_len"),s._vscf_ecc_private_key_bitlen=X("vscf_ecc_private_key_bitlen"),s._vscf_ecc_private_key_impl_tag=X("vscf_ecc_private_key_impl_tag"),s._vscf_ecc_private_key_is_valid=X("vscf_ecc_private_key_is_valid"),s._vscf_ecc_private_key_extract_public_key=X("vscf_ecc_private_key_extract_public_key"),s._vscf_ecc_private_key_new=X("vscf_ecc_private_key_new"),s._vscf_ecc_private_key_delete=X("vscf_ecc_private_key_delete"),s._vscf_ecc_private_key_shallow_copy=X("vscf_ecc_private_key_shallow_copy"),s._vscf_ecc_public_key_alg_id=X("vscf_ecc_public_key_alg_id"),s._vscf_ecc_public_key_alg_info=X("vscf_ecc_public_key_alg_info"),s._vscf_ecc_public_key_len=X("vscf_ecc_public_key_len"),s._vscf_ecc_public_key_bitlen=X("vscf_ecc_public_key_bitlen"),s._vscf_ecc_public_key_impl_tag=X("vscf_ecc_public_key_impl_tag"),s._vscf_ecc_public_key_is_valid=X("vscf_ecc_public_key_is_valid"),s._vscf_ecc_public_key_new=X("vscf_ecc_public_key_new"),s._vscf_ecc_public_key_delete=X("vscf_ecc_public_key_delete"),s._vscf_ecc_public_key_shallow_copy=X("vscf_ecc_public_key_shallow_copy"),s._vscf_ed25519_setup_defaults=X("vscf_ed25519_setup_defaults"),s._vscf_ed25519_generate_key=X("vscf_ed25519_generate_key"),s._vscf_ed25519_generate_ephemeral_key=X("vscf_ed25519_generate_ephemeral_key"),s._vscf_ed25519_import_public_key=X("vscf_ed25519_import_public_key"),s._vscf_ed25519_import_public_key_data=X("vscf_ed25519_import_public_key_data"),s._vscf_ed25519_export_public_key=X("vscf_ed25519_export_public_key"),s._vscf_ed25519_exported_public_key_data_len=X("vscf_ed25519_exported_public_key_data_len"),s._vscf_ed25519_export_public_key_data=X("vscf_ed25519_export_public_key_data"),s._vscf_ed25519_import_private_key=X("vscf_ed25519_import_private_key"),s._vscf_ed25519_import_private_key_data=X("vscf_ed25519_import_private_key_data"),s._vscf_ed25519_export_private_key=X("vscf_ed25519_export_private_key"),s._vscf_ed25519_exported_private_key_data_len=X("vscf_ed25519_exported_private_key_data_len"),s._vscf_ed25519_export_private_key_data=X("vscf_ed25519_export_private_key_data"),s._vscf_ed25519_can_encrypt=X("vscf_ed25519_can_encrypt"),s._vscf_ed25519_encrypted_len=X("vscf_ed25519_encrypted_len"),s._vscf_ed25519_encrypt=X("vscf_ed25519_encrypt"),s._vscf_ed25519_can_decrypt=X("vscf_ed25519_can_decrypt"),s._vscf_ed25519_decrypted_len=X("vscf_ed25519_decrypted_len"),s._vscf_ed25519_decrypt=X("vscf_ed25519_decrypt"),s._vscf_ed25519_can_sign=X("vscf_ed25519_can_sign"),s._vscf_ed25519_signature_len=X("vscf_ed25519_signature_len"),s._vscf_ed25519_sign_hash=X("vscf_ed25519_sign_hash"),s._vscf_ed25519_can_verify=X("vscf_ed25519_can_verify"),s._vscf_ed25519_verify_hash=X("vscf_ed25519_verify_hash"),s._vscf_ed25519_compute_shared_key=X("vscf_ed25519_compute_shared_key"),s._vscf_ed25519_shared_key_len=X("vscf_ed25519_shared_key_len"),s._vscf_ed25519_kem_shared_key_len=X("vscf_ed25519_kem_shared_key_len"),s._vscf_ed25519_kem_encapsulated_key_len=X("vscf_ed25519_kem_encapsulated_key_len"),s._vscf_ed25519_kem_encapsulate=X("vscf_ed25519_kem_encapsulate"),s._vscf_ed25519_kem_decapsulate=X("vscf_ed25519_kem_decapsulate"),s._vscf_ed25519_release_random=X("vscf_ed25519_release_random"),s._vscf_ed25519_release_ecies=X("vscf_ed25519_release_ecies"),s._vscf_ed25519_new=X("vscf_ed25519_new"),s._vscf_ed25519_delete=X("vscf_ed25519_delete"),s._vscf_ed25519_shallow_copy=X("vscf_ed25519_shallow_copy"),s._vscf_ed25519_use_random=X("vscf_ed25519_use_random"),s._vscf_ed25519_use_ecies=X("vscf_ed25519_use_ecies"),s._vscf_entropy_accumulator_setup_defaults=X("vscf_entropy_accumulator_setup_defaults"),s._vscf_entropy_accumulator_add_source=X("vscf_entropy_accumulator_add_source"),s._vscf_entropy_accumulator_is_strong=X("vscf_entropy_accumulator_is_strong"),s._vscf_entropy_accumulator_gather=X("vscf_entropy_accumulator_gather"),s._vscf_entropy_accumulator_new=X("vscf_entropy_accumulator_new"),s._vscf_entropy_accumulator_delete=X("vscf_entropy_accumulator_delete"),s._vscf_entropy_accumulator_shallow_copy=X("vscf_entropy_accumulator_shallow_copy"),s._vscf_fake_random_setup_source_byte=X("vscf_fake_random_setup_source_byte"),s._vscf_fake_random_setup_source_data=X("vscf_fake_random_setup_source_data"),s._vscf_fake_random_random=X("vscf_fake_random_random"),s._vscf_fake_random_reseed=X("vscf_fake_random_reseed"),s._vscf_fake_random_is_strong=X("vscf_fake_random_is_strong"),s._vscf_fake_random_gather=X("vscf_fake_random_gather"),s._vscf_fake_random_new=X("vscf_fake_random_new"),s._vscf_fake_random_delete=X("vscf_fake_random_delete"),s._vscf_fake_random_shallow_copy=X("vscf_fake_random_shallow_copy"),s._vscf_falcon_setup_defaults=X("vscf_falcon_setup_defaults"),s._vscf_falcon_generate_key=X("vscf_falcon_generate_key"),s._vscf_falcon_produce_alg_info=X("vscf_falcon_produce_alg_info"),s._vscf_falcon_alg_id=X("vscf_falcon_alg_id"),s._vscf_falcon_restore_alg_info=X("vscf_falcon_restore_alg_info"),s._vscf_falcon_generate_ephemeral_key=X("vscf_falcon_generate_ephemeral_key"),s._vscf_falcon_import_public_key=X("vscf_falcon_import_public_key"),s._vscf_falcon_import_public_key_data=X("vscf_falcon_import_public_key_data"),s._vscf_falcon_export_public_key=X("vscf_falcon_export_public_key"),s._vscf_falcon_exported_public_key_data_len=X("vscf_falcon_exported_public_key_data_len"),s._vscf_falcon_export_public_key_data=X("vscf_falcon_export_public_key_data"),s._vscf_falcon_import_private_key=X("vscf_falcon_import_private_key"),s._vscf_falcon_import_private_key_data=X("vscf_falcon_import_private_key_data"),s._vscf_falcon_export_private_key=X("vscf_falcon_export_private_key"),s._vscf_falcon_exported_private_key_data_len=X("vscf_falcon_exported_private_key_data_len"),s._vscf_falcon_export_private_key_data=X("vscf_falcon_export_private_key_data"),s._vscf_falcon_can_sign=X("vscf_falcon_can_sign"),s._vscf_falcon_signature_len=X("vscf_falcon_signature_len"),s._vscf_falcon_sign_hash=X("vscf_falcon_sign_hash"),s._vscf_falcon_can_verify=X("vscf_falcon_can_verify"),s._vscf_falcon_verify_hash=X("vscf_falcon_verify_hash"),s._vscf_falcon_release_random=X("vscf_falcon_release_random"),s._vscf_falcon_new=X("vscf_falcon_new"),s._vscf_falcon_delete=X("vscf_falcon_delete"),s._vscf_falcon_shallow_copy=X("vscf_falcon_shallow_copy"),s._vscf_falcon_use_random=X("vscf_falcon_use_random"),s._vscf_hash_based_alg_info_hash_alg_info=X("vscf_hash_based_alg_info_hash_alg_info"),s._vscf_hash_based_alg_info_alg_id=X("vscf_hash_based_alg_info_alg_id"),s._vscf_hash_based_alg_info_new=X("vscf_hash_based_alg_info_new"),s._vscf_hash_based_alg_info_delete=X("vscf_hash_based_alg_info_delete"),s._vscf_hash_based_alg_info_shallow_copy=X("vscf_hash_based_alg_info_shallow_copy"),s._vscf_hkdf_alg_id=X("vscf_hkdf_alg_id"),s._vscf_hkdf_produce_alg_info=X("vscf_hkdf_produce_alg_info"),s._vscf_hkdf_restore_alg_info=X("vscf_hkdf_restore_alg_info"),s._vscf_hkdf_derive=X("vscf_hkdf_derive"),s._vscf_hkdf_reset=X("vscf_hkdf_reset"),s._vscf_hkdf_set_info=X("vscf_hkdf_set_info"),s._vscf_hkdf_release_hash=X("vscf_hkdf_release_hash"),s._vscf_hkdf_new=X("vscf_hkdf_new"),s._vscf_hkdf_delete=X("vscf_hkdf_delete"),s._vscf_hkdf_shallow_copy=X("vscf_hkdf_shallow_copy"),s._vscf_hkdf_use_hash=X("vscf_hkdf_use_hash"),s._vscf_hmac_alg_id=X("vscf_hmac_alg_id"),s._vscf_hmac_produce_alg_info=X("vscf_hmac_produce_alg_info"),s._vscf_hmac_restore_alg_info=X("vscf_hmac_restore_alg_info"),s._vscf_hmac_digest_len=X("vscf_hmac_digest_len"),s._vscf_hmac_mac=X("vscf_hmac_mac"),s._vscf_hmac_start=X("vscf_hmac_start"),s._vscf_hmac_update=X("vscf_hmac_update"),s._vscf_hmac_finish=X("vscf_hmac_finish"),s._vscf_hmac_reset=X("vscf_hmac_reset"),s._vscf_hmac_release_hash=X("vscf_hmac_release_hash"),s._vscf_hmac_new=X("vscf_hmac_new"),s._vscf_hmac_delete=X("vscf_hmac_delete"),s._vscf_hmac_shallow_copy=X("vscf_hmac_shallow_copy"),s._vscf_hmac_use_hash=X("vscf_hmac_use_hash"),s._vscf_hybrid_key_alg_setup_defaults=X("vscf_hybrid_key_alg_setup_defaults"),s._vscf_hybrid_key_alg_make_key=X("vscf_hybrid_key_alg_make_key"),s._vscf_hybrid_key_alg_generate_ephemeral_key=X("vscf_hybrid_key_alg_generate_ephemeral_key"),s._vscf_hybrid_key_alg_import_public_key=X("vscf_hybrid_key_alg_import_public_key"),s._vscf_hybrid_key_alg_import_public_key_data=X("vscf_hybrid_key_alg_import_public_key_data"),s._vscf_hybrid_key_alg_export_public_key=X("vscf_hybrid_key_alg_export_public_key"),s._vscf_hybrid_key_alg_exported_public_key_data_len=X("vscf_hybrid_key_alg_exported_public_key_data_len"),s._vscf_hybrid_key_alg_export_public_key_data=X("vscf_hybrid_key_alg_export_public_key_data"),s._vscf_hybrid_key_alg_import_private_key=X("vscf_hybrid_key_alg_import_private_key"),s._vscf_hybrid_key_alg_import_private_key_data=X("vscf_hybrid_key_alg_import_private_key_data"),s._vscf_hybrid_key_alg_export_private_key=X("vscf_hybrid_key_alg_export_private_key"),s._vscf_hybrid_key_alg_exported_private_key_data_len=X("vscf_hybrid_key_alg_exported_private_key_data_len"),s._vscf_hybrid_key_alg_export_private_key_data=X("vscf_hybrid_key_alg_export_private_key_data"),s._vscf_hybrid_key_alg_can_encrypt=X("vscf_hybrid_key_alg_can_encrypt"),s._vscf_hybrid_key_alg_encrypted_len=X("vscf_hybrid_key_alg_encrypted_len"),s._vscf_hybrid_key_alg_encrypt=X("vscf_hybrid_key_alg_encrypt"),s._vscf_hybrid_key_alg_can_decrypt=X("vscf_hybrid_key_alg_can_decrypt"),s._vscf_hybrid_key_alg_decrypted_len=X("vscf_hybrid_key_alg_decrypted_len"),s._vscf_hybrid_key_alg_decrypt=X("vscf_hybrid_key_alg_decrypt"),s._vscf_hybrid_key_alg_can_sign=X("vscf_hybrid_key_alg_can_sign"),s._vscf_hybrid_key_alg_signature_len=X("vscf_hybrid_key_alg_signature_len"),s._vscf_hybrid_key_alg_sign_hash=X("vscf_hybrid_key_alg_sign_hash"),s._vscf_hybrid_key_alg_can_verify=X("vscf_hybrid_key_alg_can_verify"),s._vscf_hybrid_key_alg_verify_hash=X("vscf_hybrid_key_alg_verify_hash"),s._vscf_hybrid_key_alg_release_random=X("vscf_hybrid_key_alg_release_random"),s._vscf_hybrid_key_alg_release_cipher=X("vscf_hybrid_key_alg_release_cipher"),s._vscf_hybrid_key_alg_release_hash=X("vscf_hybrid_key_alg_release_hash"),s._vscf_hybrid_key_alg_new=X("vscf_hybrid_key_alg_new"),s._vscf_hybrid_key_alg_delete=X("vscf_hybrid_key_alg_delete"),s._vscf_hybrid_key_alg_shallow_copy=X("vscf_hybrid_key_alg_shallow_copy"),s._vscf_hybrid_key_alg_use_random=X("vscf_hybrid_key_alg_use_random"),s._vscf_hybrid_key_alg_use_cipher=X("vscf_hybrid_key_alg_use_cipher"),s._vscf_hybrid_key_alg_use_hash=X("vscf_hybrid_key_alg_use_hash"),s._vscf_hybrid_key_alg_info_first_key_alg_info=X("vscf_hybrid_key_alg_info_first_key_alg_info"),s._vscf_hybrid_key_alg_info_second_key_alg_info=X("vscf_hybrid_key_alg_info_second_key_alg_info"),s._vscf_hybrid_key_alg_info_alg_id=X("vscf_hybrid_key_alg_info_alg_id"),s._vscf_hybrid_key_alg_info_new=X("vscf_hybrid_key_alg_info_new"),s._vscf_hybrid_key_alg_info_delete=X("vscf_hybrid_key_alg_info_delete"),s._vscf_hybrid_key_alg_info_shallow_copy=X("vscf_hybrid_key_alg_info_shallow_copy"),s._vscf_hybrid_private_key_first_key=X("vscf_hybrid_private_key_first_key"),s._vscf_hybrid_private_key_second_key=X("vscf_hybrid_private_key_second_key"),s._vscf_hybrid_private_key_alg_id=X("vscf_hybrid_private_key_alg_id"),s._vscf_hybrid_private_key_alg_info=X("vscf_hybrid_private_key_alg_info"),s._vscf_hybrid_private_key_len=X("vscf_hybrid_private_key_len"),s._vscf_hybrid_private_key_bitlen=X("vscf_hybrid_private_key_bitlen"),s._vscf_hybrid_private_key_impl_tag=X("vscf_hybrid_private_key_impl_tag"),s._vscf_hybrid_private_key_is_valid=X("vscf_hybrid_private_key_is_valid"),s._vscf_hybrid_private_key_extract_public_key=X("vscf_hybrid_private_key_extract_public_key"),s._vscf_hybrid_private_key_new=X("vscf_hybrid_private_key_new"),s._vscf_hybrid_private_key_delete=X("vscf_hybrid_private_key_delete"),s._vscf_hybrid_private_key_shallow_copy=X("vscf_hybrid_private_key_shallow_copy"),s._vscf_hybrid_public_key_first_key=X("vscf_hybrid_public_key_first_key"),s._vscf_hybrid_public_key_second_key=X("vscf_hybrid_public_key_second_key"),s._vscf_hybrid_public_key_alg_id=X("vscf_hybrid_public_key_alg_id"),s._vscf_hybrid_public_key_alg_info=X("vscf_hybrid_public_key_alg_info"),s._vscf_hybrid_public_key_len=X("vscf_hybrid_public_key_len"),s._vscf_hybrid_public_key_bitlen=X("vscf_hybrid_public_key_bitlen"),s._vscf_hybrid_public_key_impl_tag=X("vscf_hybrid_public_key_impl_tag"),s._vscf_hybrid_public_key_is_valid=X("vscf_hybrid_public_key_is_valid"),s._vscf_hybrid_public_key_new=X("vscf_hybrid_public_key_new"),s._vscf_hybrid_public_key_delete=X("vscf_hybrid_public_key_delete"),s._vscf_hybrid_public_key_shallow_copy=X("vscf_hybrid_public_key_shallow_copy"),s._vscf_kdf1_alg_id=X("vscf_kdf1_alg_id"),s._vscf_kdf1_produce_alg_info=X("vscf_kdf1_produce_alg_info"),s._vscf_kdf1_restore_alg_info=X("vscf_kdf1_restore_alg_info"),s._vscf_kdf1_derive=X("vscf_kdf1_derive"),s._vscf_kdf1_release_hash=X("vscf_kdf1_release_hash"),s._vscf_kdf1_new=X("vscf_kdf1_new"),s._vscf_kdf1_delete=X("vscf_kdf1_delete"),s._vscf_kdf1_shallow_copy=X("vscf_kdf1_shallow_copy"),s._vscf_kdf1_use_hash=X("vscf_kdf1_use_hash"),s._vscf_kdf2_alg_id=X("vscf_kdf2_alg_id"),s._vscf_kdf2_produce_alg_info=X("vscf_kdf2_produce_alg_info"),s._vscf_kdf2_restore_alg_info=X("vscf_kdf2_restore_alg_info"),s._vscf_kdf2_derive=X("vscf_kdf2_derive"),s._vscf_kdf2_release_hash=X("vscf_kdf2_release_hash"),s._vscf_kdf2_new=X("vscf_kdf2_new"),s._vscf_kdf2_delete=X("vscf_kdf2_delete"),s._vscf_kdf2_shallow_copy=X("vscf_kdf2_shallow_copy"),s._vscf_kdf2_use_hash=X("vscf_kdf2_use_hash"),s._vscf_key_asn1_deserializer_setup_defaults=X("vscf_key_asn1_deserializer_setup_defaults"),s._vscf_key_asn1_deserializer_deserialize_public_key_inplace=X("vscf_key_asn1_deserializer_deserialize_public_key_inplace"),s._vscf_key_asn1_deserializer_deserialize_private_key_inplace=X("vscf_key_asn1_deserializer_deserialize_private_key_inplace"),s._vscf_key_asn1_deserializer_deserialize_public_key=X("vscf_key_asn1_deserializer_deserialize_public_key"),s._vscf_key_asn1_deserializer_deserialize_private_key=X("vscf_key_asn1_deserializer_deserialize_private_key"),s._vscf_key_asn1_deserializer_release_asn1_reader=X("vscf_key_asn1_deserializer_release_asn1_reader"),s._vscf_key_asn1_deserializer_new=X("vscf_key_asn1_deserializer_new"),s._vscf_key_asn1_deserializer_delete=X("vscf_key_asn1_deserializer_delete"),s._vscf_key_asn1_deserializer_shallow_copy=X("vscf_key_asn1_deserializer_shallow_copy"),s._vscf_key_asn1_deserializer_use_asn1_reader=X("vscf_key_asn1_deserializer_use_asn1_reader"),s._vscf_key_asn1_serializer_setup_defaults=X("vscf_key_asn1_serializer_setup_defaults"),s._vscf_key_asn1_serializer_serialize_public_key_inplace=X("vscf_key_asn1_serializer_serialize_public_key_inplace"),s._vscf_key_asn1_serializer_serialized_public_key_len=X("vscf_key_asn1_serializer_serialized_public_key_len"),s._vscf_key_asn1_serializer_serialize_private_key_inplace=X("vscf_key_asn1_serializer_serialize_private_key_inplace"),s._vscf_key_asn1_serializer_serialized_private_key_len=X("vscf_key_asn1_serializer_serialized_private_key_len"),s._vscf_key_asn1_serializer_serialize_public_key=X("vscf_key_asn1_serializer_serialize_public_key"),s._vscf_key_asn1_serializer_serialize_private_key=X("vscf_key_asn1_serializer_serialize_private_key"),s._vscf_key_asn1_serializer_release_asn1_writer=X("vscf_key_asn1_serializer_release_asn1_writer"),s._vscf_key_asn1_serializer_new=X("vscf_key_asn1_serializer_new"),s._vscf_key_asn1_serializer_delete=X("vscf_key_asn1_serializer_delete"),s._vscf_key_asn1_serializer_shallow_copy=X("vscf_key_asn1_serializer_shallow_copy"),s._vscf_key_asn1_serializer_use_asn1_writer=X("vscf_key_asn1_serializer_use_asn1_writer"),s._vscf_key_material_rng_reset_key_material=X("vscf_key_material_rng_reset_key_material"),s._vscf_key_material_rng_random=X("vscf_key_material_rng_random"),s._vscf_key_material_rng_reseed=X("vscf_key_material_rng_reseed"),s._vscf_key_material_rng_new=X("vscf_key_material_rng_new"),s._vscf_key_material_rng_delete=X("vscf_key_material_rng_delete"),s._vscf_key_material_rng_shallow_copy=X("vscf_key_material_rng_shallow_copy"),s._vscf_message_info_der_serializer_setup_defaults=X("vscf_message_info_der_serializer_setup_defaults"),s._vscf_message_info_der_serializer_serialized_len=X("vscf_message_info_der_serializer_serialized_len"),s._vscf_message_info_der_serializer_serialize=X("vscf_message_info_der_serializer_serialize"),s._vscf_message_info_der_serializer_read_prefix=X("vscf_message_info_der_serializer_read_prefix"),s._vscf_message_info_der_serializer_deserialize=X("vscf_message_info_der_serializer_deserialize"),s._vscf_message_info_der_serializer_serialized_footer_len=X("vscf_message_info_der_serializer_serialized_footer_len"),s._vscf_message_info_der_serializer_serialize_footer=X("vscf_message_info_der_serializer_serialize_footer"),s._vscf_message_info_der_serializer_deserialize_footer=X("vscf_message_info_der_serializer_deserialize_footer"),s._vscf_message_info_der_serializer_release_asn1_reader=X("vscf_message_info_der_serializer_release_asn1_reader"),s._vscf_message_info_der_serializer_release_asn1_writer=X("vscf_message_info_der_serializer_release_asn1_writer"),s._vscf_message_info_der_serializer_new=X("vscf_message_info_der_serializer_new"),s._vscf_message_info_der_serializer_delete=X("vscf_message_info_der_serializer_delete"),s._vscf_message_info_der_serializer_shallow_copy=X("vscf_message_info_der_serializer_shallow_copy"),s._vscf_message_info_der_serializer_use_asn1_reader=X("vscf_message_info_der_serializer_use_asn1_reader"),s._vscf_message_info_der_serializer_use_asn1_writer=X("vscf_message_info_der_serializer_use_asn1_writer"),s._vscf_pbe_alg_info_kdf_alg_info=X("vscf_pbe_alg_info_kdf_alg_info"),s._vscf_pbe_alg_info_cipher_alg_info=X("vscf_pbe_alg_info_cipher_alg_info"),s._vscf_pbe_alg_info_alg_id=X("vscf_pbe_alg_info_alg_id"),s._vscf_pbe_alg_info_new=X("vscf_pbe_alg_info_new"),s._vscf_pbe_alg_info_delete=X("vscf_pbe_alg_info_delete"),s._vscf_pbe_alg_info_shallow_copy=X("vscf_pbe_alg_info_shallow_copy"),s._vscf_pkcs5_pbes2_reset=X("vscf_pkcs5_pbes2_reset"),s._vscf_pkcs5_pbes2_alg_id=X("vscf_pkcs5_pbes2_alg_id"),s._vscf_pkcs5_pbes2_produce_alg_info=X("vscf_pkcs5_pbes2_produce_alg_info"),s._vscf_pkcs5_pbes2_restore_alg_info=X("vscf_pkcs5_pbes2_restore_alg_info"),s._vscf_pkcs5_pbes2_encrypt=X("vscf_pkcs5_pbes2_encrypt"),s._vscf_pkcs5_pbes2_encrypted_len=X("vscf_pkcs5_pbes2_encrypted_len"),s._vscf_pkcs5_pbes2_precise_encrypted_len=X("vscf_pkcs5_pbes2_precise_encrypted_len"),s._vscf_pkcs5_pbes2_decrypt=X("vscf_pkcs5_pbes2_decrypt"),s._vscf_pkcs5_pbes2_decrypted_len=X("vscf_pkcs5_pbes2_decrypted_len"),s._vscf_pkcs5_pbes2_release_kdf=X("vscf_pkcs5_pbes2_release_kdf"),s._vscf_pkcs5_pbes2_release_cipher=X("vscf_pkcs5_pbes2_release_cipher"),s._vscf_pkcs5_pbes2_new=X("vscf_pkcs5_pbes2_new"),s._vscf_pkcs5_pbes2_delete=X("vscf_pkcs5_pbes2_delete"),s._vscf_pkcs5_pbes2_shallow_copy=X("vscf_pkcs5_pbes2_shallow_copy"),s._vscf_pkcs5_pbes2_use_kdf=X("vscf_pkcs5_pbes2_use_kdf"),s._vscf_pkcs5_pbes2_use_cipher=X("vscf_pkcs5_pbes2_use_cipher"),s._vscf_pkcs5_pbkdf2_setup_defaults=X("vscf_pkcs5_pbkdf2_setup_defaults"),s._vscf_pkcs5_pbkdf2_alg_id=X("vscf_pkcs5_pbkdf2_alg_id"),s._vscf_pkcs5_pbkdf2_produce_alg_info=X("vscf_pkcs5_pbkdf2_produce_alg_info"),s._vscf_pkcs5_pbkdf2_restore_alg_info=X("vscf_pkcs5_pbkdf2_restore_alg_info"),s._vscf_pkcs5_pbkdf2_reset=X("vscf_pkcs5_pbkdf2_reset"),s._vscf_pkcs5_pbkdf2_derive=X("vscf_pkcs5_pbkdf2_derive"),s._vscf_pkcs5_pbkdf2_set_info=X("vscf_pkcs5_pbkdf2_set_info"),s._vscf_pkcs5_pbkdf2_release_hmac=X("vscf_pkcs5_pbkdf2_release_hmac"),s._vscf_pkcs5_pbkdf2_new=X("vscf_pkcs5_pbkdf2_new"),s._vscf_pkcs5_pbkdf2_delete=X("vscf_pkcs5_pbkdf2_delete"),s._vscf_pkcs5_pbkdf2_shallow_copy=X("vscf_pkcs5_pbkdf2_shallow_copy"),s._vscf_pkcs5_pbkdf2_use_hmac=X("vscf_pkcs5_pbkdf2_use_hmac"),s._vscf_pkcs8_serializer_setup_defaults=X("vscf_pkcs8_serializer_setup_defaults"),s._vscf_pkcs8_serializer_serialize_public_key_inplace=X("vscf_pkcs8_serializer_serialize_public_key_inplace"),s._vscf_pkcs8_serializer_serialized_public_key_len=X("vscf_pkcs8_serializer_serialized_public_key_len"),s._vscf_pkcs8_serializer_serialize_private_key_inplace=X("vscf_pkcs8_serializer_serialize_private_key_inplace"),s._vscf_pkcs8_serializer_serialized_private_key_len=X("vscf_pkcs8_serializer_serialized_private_key_len"),s._vscf_pkcs8_serializer_serialize_public_key=X("vscf_pkcs8_serializer_serialize_public_key"),s._vscf_pkcs8_serializer_serialize_private_key=X("vscf_pkcs8_serializer_serialize_private_key"),s._vscf_pkcs8_serializer_release_asn1_writer=X("vscf_pkcs8_serializer_release_asn1_writer"),s._vscf_pkcs8_serializer_new=X("vscf_pkcs8_serializer_new"),s._vscf_pkcs8_serializer_delete=X("vscf_pkcs8_serializer_delete"),s._vscf_pkcs8_serializer_shallow_copy=X("vscf_pkcs8_serializer_shallow_copy"),s._vscf_pkcs8_serializer_use_asn1_writer=X("vscf_pkcs8_serializer_use_asn1_writer"),s._vscf_random_padding_alg_id=X("vscf_random_padding_alg_id"),s._vscf_random_padding_produce_alg_info=X("vscf_random_padding_produce_alg_info"),s._vscf_random_padding_restore_alg_info=X("vscf_random_padding_restore_alg_info"),s._vscf_random_padding_configure=X("vscf_random_padding_configure"),s._vscf_random_padding_padded_data_len=X("vscf_random_padding_padded_data_len"),s._vscf_random_padding_len=X("vscf_random_padding_len"),s._vscf_random_padding_len_max=X("vscf_random_padding_len_max"),s._vscf_random_padding_start_data_processing=X("vscf_random_padding_start_data_processing"),s._vscf_random_padding_process_data=X("vscf_random_padding_process_data"),s._vscf_random_padding_finish_data_processing=X("vscf_random_padding_finish_data_processing"),s._vscf_random_padding_start_padded_data_processing=X("vscf_random_padding_start_padded_data_processing"),s._vscf_random_padding_process_padded_data=X("vscf_random_padding_process_padded_data"),s._vscf_random_padding_finish_padded_data_processing_out_len=X("vscf_random_padding_finish_padded_data_processing_out_len"),s._vscf_random_padding_finish_padded_data_processing=X("vscf_random_padding_finish_padded_data_processing"),s._vscf_random_padding_release_random=X("vscf_random_padding_release_random"),s._vscf_random_padding_new=X("vscf_random_padding_new"),s._vscf_random_padding_delete=X("vscf_random_padding_delete"),s._vscf_random_padding_shallow_copy=X("vscf_random_padding_shallow_copy"),s._vscf_random_padding_use_random=X("vscf_random_padding_use_random"),s._vscf_raw_private_key_data=X("vscf_raw_private_key_data"),s._vscf_raw_private_key_has_public_key=X("vscf_raw_private_key_has_public_key"),s._vscf_raw_private_key_set_public_key=X("vscf_raw_private_key_set_public_key"),s._vscf_raw_private_key_get_public_key=X("vscf_raw_private_key_get_public_key"),s._vscf_raw_private_key_alg_id=X("vscf_raw_private_key_alg_id"),s._vscf_raw_private_key_alg_info=X("vscf_raw_private_key_alg_info"),s._vscf_raw_private_key_len=X("vscf_raw_private_key_len"),s._vscf_raw_private_key_bitlen=X("vscf_raw_private_key_bitlen"),s._vscf_raw_private_key_impl_tag=X("vscf_raw_private_key_impl_tag"),s._vscf_raw_private_key_is_valid=X("vscf_raw_private_key_is_valid"),s._vscf_raw_private_key_extract_public_key=X("vscf_raw_private_key_extract_public_key"),s._vscf_raw_private_key_new=X("vscf_raw_private_key_new"),s._vscf_raw_private_key_delete=X("vscf_raw_private_key_delete"),s._vscf_raw_private_key_shallow_copy=X("vscf_raw_private_key_shallow_copy"),s._vscf_raw_public_key_data=X("vscf_raw_public_key_data"),s._vscf_raw_public_key_alg_id=X("vscf_raw_public_key_alg_id"),s._vscf_raw_public_key_alg_info=X("vscf_raw_public_key_alg_info"),s._vscf_raw_public_key_len=X("vscf_raw_public_key_len"),s._vscf_raw_public_key_bitlen=X("vscf_raw_public_key_bitlen"),s._vscf_raw_public_key_impl_tag=X("vscf_raw_public_key_impl_tag"),s._vscf_raw_public_key_is_valid=X("vscf_raw_public_key_is_valid"),s._vscf_raw_public_key_new=X("vscf_raw_public_key_new"),s._vscf_raw_public_key_delete=X("vscf_raw_public_key_delete"),s._vscf_raw_public_key_shallow_copy=X("vscf_raw_public_key_shallow_copy"),s._vscf_round5_setup_defaults=X("vscf_round5_setup_defaults"),s._vscf_round5_generate_key=X("vscf_round5_generate_key"),s._vscf_round5_generate_ephemeral_key=X("vscf_round5_generate_ephemeral_key"),s._vscf_round5_import_public_key=X("vscf_round5_import_public_key"),s._vscf_round5_import_public_key_data=X("vscf_round5_import_public_key_data"),s._vscf_round5_export_public_key=X("vscf_round5_export_public_key"),s._vscf_round5_exported_public_key_data_len=X("vscf_round5_exported_public_key_data_len"),s._vscf_round5_export_public_key_data=X("vscf_round5_export_public_key_data"),s._vscf_round5_import_private_key=X("vscf_round5_import_private_key"),s._vscf_round5_import_private_key_data=X("vscf_round5_import_private_key_data"),s._vscf_round5_export_private_key=X("vscf_round5_export_private_key"),s._vscf_round5_exported_private_key_data_len=X("vscf_round5_exported_private_key_data_len"),s._vscf_round5_export_private_key_data=X("vscf_round5_export_private_key_data"),s._vscf_round5_kem_shared_key_len=X("vscf_round5_kem_shared_key_len"),s._vscf_round5_kem_encapsulated_key_len=X("vscf_round5_kem_encapsulated_key_len"),s._vscf_round5_kem_encapsulate=X("vscf_round5_kem_encapsulate"),s._vscf_round5_kem_decapsulate=X("vscf_round5_kem_decapsulate"),s._vscf_round5_release_random=X("vscf_round5_release_random"),s._vscf_round5_new=X("vscf_round5_new"),s._vscf_round5_delete=X("vscf_round5_delete"),s._vscf_round5_shallow_copy=X("vscf_round5_shallow_copy"),s._vscf_round5_use_random=X("vscf_round5_use_random"),s._vscf_rsa_setup_defaults=X("vscf_rsa_setup_defaults"),s._vscf_rsa_generate_key=X("vscf_rsa_generate_key"),s._vscf_rsa_generate_ephemeral_key=X("vscf_rsa_generate_ephemeral_key"),s._vscf_rsa_import_public_key=X("vscf_rsa_import_public_key"),s._vscf_rsa_import_public_key_data=X("vscf_rsa_import_public_key_data"),s._vscf_rsa_export_public_key=X("vscf_rsa_export_public_key"),s._vscf_rsa_exported_public_key_data_len=X("vscf_rsa_exported_public_key_data_len"),s._vscf_rsa_export_public_key_data=X("vscf_rsa_export_public_key_data"),s._vscf_rsa_import_private_key=X("vscf_rsa_import_private_key"),s._vscf_rsa_import_private_key_data=X("vscf_rsa_import_private_key_data"),s._vscf_rsa_export_private_key=X("vscf_rsa_export_private_key"),s._vscf_rsa_exported_private_key_data_len=X("vscf_rsa_exported_private_key_data_len"),s._vscf_rsa_export_private_key_data=X("vscf_rsa_export_private_key_data"),s._vscf_rsa_can_encrypt=X("vscf_rsa_can_encrypt"),s._vscf_rsa_encrypted_len=X("vscf_rsa_encrypted_len"),s._vscf_rsa_encrypt=X("vscf_rsa_encrypt"),s._vscf_rsa_can_decrypt=X("vscf_rsa_can_decrypt"),s._vscf_rsa_decrypted_len=X("vscf_rsa_decrypted_len"),s._vscf_rsa_decrypt=X("vscf_rsa_decrypt"),s._vscf_rsa_can_sign=X("vscf_rsa_can_sign"),s._vscf_rsa_signature_len=X("vscf_rsa_signature_len"),s._vscf_rsa_sign_hash=X("vscf_rsa_sign_hash"),s._vscf_rsa_can_verify=X("vscf_rsa_can_verify"),s._vscf_rsa_verify_hash=X("vscf_rsa_verify_hash"),s._vscf_rsa_release_random=X("vscf_rsa_release_random"),s._vscf_rsa_new=X("vscf_rsa_new"),s._vscf_rsa_delete=X("vscf_rsa_delete"),s._vscf_rsa_shallow_copy=X("vscf_rsa_shallow_copy"),s._vscf_rsa_use_random=X("vscf_rsa_use_random"),s._vscf_rsa_private_key_is_valid=X("vscf_rsa_private_key_is_valid"),s._vscf_rsa_private_key_len=X("vscf_rsa_private_key_len"),s._vscf_rsa_private_key_alg_id=X("vscf_rsa_private_key_alg_id"),s._vscf_rsa_private_key_alg_info=X("vscf_rsa_private_key_alg_info"),s._vscf_rsa_private_key_bitlen=X("vscf_rsa_private_key_bitlen"),s._vscf_rsa_private_key_impl_tag=X("vscf_rsa_private_key_impl_tag"),s._vscf_rsa_private_key_extract_public_key=X("vscf_rsa_private_key_extract_public_key"),s._vscf_rsa_private_key_new=X("vscf_rsa_private_key_new"),s._vscf_rsa_private_key_delete=X("vscf_rsa_private_key_delete"),s._vscf_rsa_private_key_shallow_copy=X("vscf_rsa_private_key_shallow_copy"),s._vscf_rsa_public_key_key_exponent=X("vscf_rsa_public_key_key_exponent"),s._vscf_rsa_public_key_is_valid=X("vscf_rsa_public_key_is_valid"),s._vscf_rsa_public_key_len=X("vscf_rsa_public_key_len"),s._vscf_rsa_public_key_alg_id=X("vscf_rsa_public_key_alg_id"),s._vscf_rsa_public_key_alg_info=X("vscf_rsa_public_key_alg_info"),s._vscf_rsa_public_key_bitlen=X("vscf_rsa_public_key_bitlen"),s._vscf_rsa_public_key_impl_tag=X("vscf_rsa_public_key_impl_tag"),s._vscf_rsa_public_key_new=X("vscf_rsa_public_key_new"),s._vscf_rsa_public_key_delete=X("vscf_rsa_public_key_delete"),s._vscf_rsa_public_key_shallow_copy=X("vscf_rsa_public_key_shallow_copy"),s._vscf_salted_kdf_alg_info_hash_alg_info=X("vscf_salted_kdf_alg_info_hash_alg_info"),s._vscf_salted_kdf_alg_info_salt=X("vscf_salted_kdf_alg_info_salt"),s._vscf_salted_kdf_alg_info_iteration_count=X("vscf_salted_kdf_alg_info_iteration_count"),s._vscf_salted_kdf_alg_info_alg_id=X("vscf_salted_kdf_alg_info_alg_id"),s._vscf_salted_kdf_alg_info_new=X("vscf_salted_kdf_alg_info_new"),s._vscf_salted_kdf_alg_info_delete=X("vscf_salted_kdf_alg_info_delete"),s._vscf_salted_kdf_alg_info_shallow_copy=X("vscf_salted_kdf_alg_info_shallow_copy"),s._vscf_sec1_serializer_setup_defaults=X("vscf_sec1_serializer_setup_defaults"),s._vscf_sec1_serializer_serialize_public_key_inplace=X("vscf_sec1_serializer_serialize_public_key_inplace"),s._vscf_sec1_serializer_serialized_public_key_len=X("vscf_sec1_serializer_serialized_public_key_len"),s._vscf_sec1_serializer_serialize_private_key_inplace=X("vscf_sec1_serializer_serialize_private_key_inplace"),s._vscf_sec1_serializer_serialized_private_key_len=X("vscf_sec1_serializer_serialized_private_key_len"),s._vscf_sec1_serializer_serialize_public_key=X("vscf_sec1_serializer_serialize_public_key"),s._vscf_sec1_serializer_serialize_private_key=X("vscf_sec1_serializer_serialize_private_key"),s._vscf_sec1_serializer_release_asn1_writer=X("vscf_sec1_serializer_release_asn1_writer"),s._vscf_sec1_serializer_new=X("vscf_sec1_serializer_new"),s._vscf_sec1_serializer_delete=X("vscf_sec1_serializer_delete"),s._vscf_sec1_serializer_shallow_copy=X("vscf_sec1_serializer_shallow_copy"),s._vscf_sec1_serializer_use_asn1_writer=X("vscf_sec1_serializer_use_asn1_writer"),s._vscf_seed_entropy_source_reset_seed=X("vscf_seed_entropy_source_reset_seed"),s._vscf_seed_entropy_source_is_strong=X("vscf_seed_entropy_source_is_strong"),s._vscf_seed_entropy_source_gather=X("vscf_seed_entropy_source_gather"),s._vscf_seed_entropy_source_new=X("vscf_seed_entropy_source_new"),s._vscf_seed_entropy_source_delete=X("vscf_seed_entropy_source_delete"),s._vscf_seed_entropy_source_shallow_copy=X("vscf_seed_entropy_source_shallow_copy"),s._vscf_sha224_alg_id=X("vscf_sha224_alg_id"),s._vscf_sha224_produce_alg_info=X("vscf_sha224_produce_alg_info"),s._vscf_sha224_restore_alg_info=X("vscf_sha224_restore_alg_info"),s._vscf_sha224_hash=X("vscf_sha224_hash"),s._vscf_sha224_start=X("vscf_sha224_start"),s._vscf_sha224_update=X("vscf_sha224_update"),s._vscf_sha224_finish=X("vscf_sha224_finish"),s._vscf_sha224_new=X("vscf_sha224_new"),s._vscf_sha224_delete=X("vscf_sha224_delete"),s._vscf_sha224_shallow_copy=X("vscf_sha224_shallow_copy"),s._vscf_sha256_alg_id=X("vscf_sha256_alg_id"),s._vscf_sha256_produce_alg_info=X("vscf_sha256_produce_alg_info"),s._vscf_sha256_restore_alg_info=X("vscf_sha256_restore_alg_info"),s._vscf_sha256_hash=X("vscf_sha256_hash"),s._vscf_sha256_start=X("vscf_sha256_start"),s._vscf_sha256_update=X("vscf_sha256_update"),s._vscf_sha256_finish=X("vscf_sha256_finish"),s._vscf_sha256_new=X("vscf_sha256_new"),s._vscf_sha256_delete=X("vscf_sha256_delete"),s._vscf_sha256_shallow_copy=X("vscf_sha256_shallow_copy"),s._vscf_sha384_alg_id=X("vscf_sha384_alg_id"),s._vscf_sha384_produce_alg_info=X("vscf_sha384_produce_alg_info"),s._vscf_sha384_restore_alg_info=X("vscf_sha384_restore_alg_info"),s._vscf_sha384_hash=X("vscf_sha384_hash"),s._vscf_sha384_start=X("vscf_sha384_start"),s._vscf_sha384_update=X("vscf_sha384_update"),s._vscf_sha384_finish=X("vscf_sha384_finish"),s._vscf_sha384_new=X("vscf_sha384_new"),s._vscf_sha384_delete=X("vscf_sha384_delete"),s._vscf_sha384_shallow_copy=X("vscf_sha384_shallow_copy"),s._vscf_sha512_alg_id=X("vscf_sha512_alg_id"),s._vscf_sha512_produce_alg_info=X("vscf_sha512_produce_alg_info"),s._vscf_sha512_restore_alg_info=X("vscf_sha512_restore_alg_info"),s._vscf_sha512_hash=X("vscf_sha512_hash"),s._vscf_sha512_start=X("vscf_sha512_start"),s._vscf_sha512_update=X("vscf_sha512_update"),s._vscf_sha512_finish=X("vscf_sha512_finish"),s._vscf_sha512_new=X("vscf_sha512_new"),s._vscf_sha512_delete=X("vscf_sha512_delete"),s._vscf_sha512_shallow_copy=X("vscf_sha512_shallow_copy"),s._vscf_simple_alg_info_alg_id=X("vscf_simple_alg_info_alg_id"),s._vscf_simple_alg_info_new=X("vscf_simple_alg_info_new"),s._vscf_simple_alg_info_delete=X("vscf_simple_alg_info_delete"),s._vscf_simple_alg_info_shallow_copy=X("vscf_simple_alg_info_shallow_copy"),s._vscf_simple_alg_info_new_with_alg_id=X("vscf_simple_alg_info_new_with_alg_id"),s._vscf_alg_factory_create_hash_from_info=X("vscf_alg_factory_create_hash_from_info"),s._vscf_alg_factory_create_mac_from_info=X("vscf_alg_factory_create_mac_from_info"),s._vscf_alg_factory_create_kdf_from_info=X("vscf_alg_factory_create_kdf_from_info"),s._vscf_alg_factory_create_salted_kdf_from_info=X("vscf_alg_factory_create_salted_kdf_from_info"),s._vscf_alg_factory_create_cipher_from_info=X("vscf_alg_factory_create_cipher_from_info"),s._vscf_alg_factory_create_padding_from_info=X("vscf_alg_factory_create_padding_from_info"),s._vscf_base64_encoded_len=X("vscf_base64_encoded_len"),s._vscf_base64_encode=X("vscf_base64_encode"),s._vscf_base64_decoded_len=X("vscf_base64_decoded_len"),s._vscf_base64_decode=X("vscf_base64_decode"),s._vscf_brainkey_client_release_random=X("vscf_brainkey_client_release_random"),s._vscf_brainkey_client_release_operation_random=X("vscf_brainkey_client_release_operation_random"),s._vscf_brainkey_client_new=X("vscf_brainkey_client_new"),s._vscf_brainkey_client_delete=X("vscf_brainkey_client_delete"),s._vscf_brainkey_client_shallow_copy=X("vscf_brainkey_client_shallow_copy"),s._vscf_brainkey_client_use_random=X("vscf_brainkey_client_use_random"),s._vscf_brainkey_client_use_operation_random=X("vscf_brainkey_client_use_operation_random"),s._vscf_brainkey_client_setup_defaults=X("vscf_brainkey_client_setup_defaults"),s._vscf_brainkey_client_blind=X("vscf_brainkey_client_blind"),s._vscf_brainkey_client_deblind=X("vscf_brainkey_client_deblind"),s._vscf_brainkey_server_release_random=X("vscf_brainkey_server_release_random"),s._vscf_brainkey_server_release_operation_random=X("vscf_brainkey_server_release_operation_random"),s._vscf_brainkey_server_new=X("vscf_brainkey_server_new"),s._vscf_brainkey_server_delete=X("vscf_brainkey_server_delete"),s._vscf_brainkey_server_shallow_copy=X("vscf_brainkey_server_shallow_copy"),s._vscf_brainkey_server_use_random=X("vscf_brainkey_server_use_random"),s._vscf_brainkey_server_use_operation_random=X("vscf_brainkey_server_use_operation_random"),s._vscf_brainkey_server_setup_defaults=X("vscf_brainkey_server_setup_defaults"),s._vscf_brainkey_server_generate_identity_secret=X("vscf_brainkey_server_generate_identity_secret");s._vscf_brainkey_server_harden=X("vscf_brainkey_server_harden"),s._vscf_ecies_release_random=X("vscf_ecies_release_random"),s._vscf_ecies_release_cipher=X("vscf_ecies_release_cipher"),s._vscf_ecies_release_mac=X("vscf_ecies_release_mac"),s._vscf_ecies_release_kdf=X("vscf_ecies_release_kdf"),s._vscf_ecies_release_ephemeral_key=X("vscf_ecies_release_ephemeral_key"),s._vscf_ecies_new=X("vscf_ecies_new"),s._vscf_ecies_delete=X("vscf_ecies_delete"),s._vscf_ecies_shallow_copy=X("vscf_ecies_shallow_copy"),s._vscf_ecies_use_random=X("vscf_ecies_use_random"),s._vscf_ecies_use_cipher=X("vscf_ecies_use_cipher"),s._vscf_ecies_use_mac=X("vscf_ecies_use_mac"),s._vscf_ecies_use_kdf=X("vscf_ecies_use_kdf"),s._vscf_ecies_use_ephemeral_key=X("vscf_ecies_use_ephemeral_key"),s._vscf_ecies_set_key_alg=X("vscf_ecies_set_key_alg"),s._vscf_ecies_release_key_alg=X("vscf_ecies_release_key_alg"),s._vscf_ecies_setup_defaults=X("vscf_ecies_setup_defaults"),s._vscf_ecies_setup_defaults_no_random=X("vscf_ecies_setup_defaults_no_random"),s._vscf_ecies_encrypted_len=X("vscf_ecies_encrypted_len"),s._vscf_ecies_encrypt=X("vscf_ecies_encrypt"),s._vscf_ecies_decrypted_len=X("vscf_ecies_decrypted_len"),s._vscf_ecies_decrypt=X("vscf_ecies_decrypt"),s._vscf_error_ctx_size=X("vscf_error_ctx_size"),s._vscf_error_reset=X("vscf_error_reset"),s._vscf_error_status=X("vscf_error_status"),s._vscf_footer_info_new=X("vscf_footer_info_new"),s._vscf_footer_info_delete=X("vscf_footer_info_delete"),s._vscf_footer_info_shallow_copy=X("vscf_footer_info_shallow_copy"),s._vscf_footer_info_has_signed_data_info=X("vscf_footer_info_has_signed_data_info"),s._vscf_footer_info_signed_data_info=X("vscf_footer_info_signed_data_info"),s._vscf_footer_info_set_data_size=X("vscf_footer_info_set_data_size"),s._vscf_footer_info_data_size=X("vscf_footer_info_data_size"),s._vscf_group_session_release_rng=X("vscf_group_session_release_rng"),s._vscf_group_session_new=X("vscf_group_session_new"),s._vscf_group_session_delete=X("vscf_group_session_delete"),s._vscf_group_session_shallow_copy=X("vscf_group_session_shallow_copy"),s._vscf_group_session_use_rng=X("vscf_group_session_use_rng"),s._vscf_group_session_get_current_epoch=X("vscf_group_session_get_current_epoch"),s._vscf_group_session_setup_defaults=X("vscf_group_session_setup_defaults"),s._vscf_group_session_get_session_id=X("vscf_group_session_get_session_id"),s._vscf_group_session_add_epoch=X("vscf_group_session_add_epoch"),s._vscf_group_session_encrypt=X("vscf_group_session_encrypt"),s._vscf_group_session_decrypt_len=X("vscf_group_session_decrypt_len"),s._vscf_group_session_decrypt=X("vscf_group_session_decrypt"),s._vscf_group_session_create_group_ticket=X("vscf_group_session_create_group_ticket"),s._vscf_group_session_message_new=X("vscf_group_session_message_new"),s._vscf_group_session_message_delete=X("vscf_group_session_message_delete"),s._vscf_group_session_message_shallow_copy=X("vscf_group_session_message_shallow_copy"),s._vscf_group_session_message_get_type=X("vscf_group_session_message_get_type"),s._vscf_group_session_message_get_session_id=X("vscf_group_session_message_get_session_id"),s._vscf_group_session_message_get_epoch=X("vscf_group_session_message_get_epoch"),s._vscf_group_session_message_serialize_len=X("vscf_group_session_message_serialize_len"),s._vscf_group_session_message_serialize=X("vscf_group_session_message_serialize"),s._vscf_group_session_message_deserialize=X("vscf_group_session_message_deserialize"),s._vscf_group_session_ticket_release_rng=X("vscf_group_session_ticket_release_rng"),s._vscf_group_session_ticket_new=X("vscf_group_session_ticket_new"),s._vscf_group_session_ticket_delete=X("vscf_group_session_ticket_delete"),s._vscf_group_session_ticket_shallow_copy=X("vscf_group_session_ticket_shallow_copy"),s._vscf_group_session_ticket_use_rng=X("vscf_group_session_ticket_use_rng"),s._vscf_group_session_ticket_setup_defaults=X("vscf_group_session_ticket_setup_defaults"),s._vscf_group_session_ticket_setup_ticket_as_new=X("vscf_group_session_ticket_setup_ticket_as_new"),s._vscf_group_session_ticket_get_ticket_message=X("vscf_group_session_ticket_get_ticket_message"),s._vscf_key_alg_factory_create_from_alg_id=X("vscf_key_alg_factory_create_from_alg_id"),s._vscf_key_alg_factory_create_from_key=X("vscf_key_alg_factory_create_from_key"),s._vscf_key_alg_factory_create_from_raw_public_key=X("vscf_key_alg_factory_create_from_raw_public_key"),s._vscf_key_alg_factory_create_from_raw_private_key=X("vscf_key_alg_factory_create_from_raw_private_key"),s._vscf_key_info_new=X("vscf_key_info_new"),s._vscf_key_info_new_with_alg_info=X("vscf_key_info_new_with_alg_info"),s._vscf_key_info_delete=X("vscf_key_info_delete"),s._vscf_key_info_shallow_copy=X("vscf_key_info_shallow_copy"),s._vscf_key_info_is_compound=X("vscf_key_info_is_compound"),s._vscf_key_info_is_hybrid=X("vscf_key_info_is_hybrid"),s._vscf_key_info_is_compound_hybrid=X("vscf_key_info_is_compound_hybrid"),s._vscf_key_info_is_compound_hybrid_cipher=X("vscf_key_info_is_compound_hybrid_cipher"),s._vscf_key_info_is_compound_hybrid_signer=X("vscf_key_info_is_compound_hybrid_signer"),s._vscf_key_info_is_hybrid_post_quantum=X("vscf_key_info_is_hybrid_post_quantum"),s._vscf_key_info_is_hybrid_post_quantum_cipher=X("vscf_key_info_is_hybrid_post_quantum_cipher"),s._vscf_key_info_is_hybrid_post_quantum_signer=X("vscf_key_info_is_hybrid_post_quantum_signer"),s._vscf_key_info_alg_id=X("vscf_key_info_alg_id"),s._vscf_key_info_compound_cipher_alg_id=X("vscf_key_info_compound_cipher_alg_id"),s._vscf_key_info_compound_signer_alg_id=X("vscf_key_info_compound_signer_alg_id"),s._vscf_key_info_hybrid_first_key_alg_id=X("vscf_key_info_hybrid_first_key_alg_id"),s._vscf_key_info_hybrid_second_key_alg_id=X("vscf_key_info_hybrid_second_key_alg_id"),s._vscf_key_info_compound_hybrid_cipher_first_key_alg_id=X("vscf_key_info_compound_hybrid_cipher_first_key_alg_id"),s._vscf_key_info_compound_hybrid_cipher_second_key_alg_id=X("vscf_key_info_compound_hybrid_cipher_second_key_alg_id"),s._vscf_key_info_compound_hybrid_signer_first_key_alg_id=X("vscf_key_info_compound_hybrid_signer_first_key_alg_id"),s._vscf_key_info_compound_hybrid_signer_second_key_alg_id=X("vscf_key_info_compound_hybrid_signer_second_key_alg_id"),s._vscf_key_provider_release_random=X("vscf_key_provider_release_random"),s._vscf_key_provider_new=X("vscf_key_provider_new"),s._vscf_key_provider_delete=X("vscf_key_provider_delete"),s._vscf_key_provider_shallow_copy=X("vscf_key_provider_shallow_copy"),s._vscf_key_provider_use_random=X("vscf_key_provider_use_random"),s._vscf_key_provider_setup_defaults=X("vscf_key_provider_setup_defaults"),s._vscf_key_provider_set_rsa_params=X("vscf_key_provider_set_rsa_params"),s._vscf_key_provider_generate_private_key=X("vscf_key_provider_generate_private_key"),s._vscf_key_provider_generate_post_quantum_private_key=X("vscf_key_provider_generate_post_quantum_private_key"),s._vscf_key_provider_generate_compound_hybrid_private_key=X("vscf_key_provider_generate_compound_hybrid_private_key"),s._vscf_key_provider_generate_hybrid_private_key=X("vscf_key_provider_generate_hybrid_private_key"),s._vscf_key_provider_generate_compound_private_key=X("vscf_key_provider_generate_compound_private_key"),s._vscf_key_provider_import_private_key=X("vscf_key_provider_import_private_key"),s._vscf_key_provider_import_public_key=X("vscf_key_provider_import_public_key"),s._vscf_key_provider_exported_public_key_len=X("vscf_key_provider_exported_public_key_len"),s._vscf_key_provider_export_public_key=X("vscf_key_provider_export_public_key"),s._vscf_key_provider_exported_private_key_len=X("vscf_key_provider_exported_private_key_len"),s._vscf_key_provider_export_private_key=X("vscf_key_provider_export_private_key"),s._vscf_key_recipient_info_new=X("vscf_key_recipient_info_new"),s._vscf_key_recipient_info_new_with_data=X("vscf_key_recipient_info_new_with_data"),s._vscf_key_recipient_info_delete=X("vscf_key_recipient_info_delete"),s._vscf_key_recipient_info_shallow_copy=X("vscf_key_recipient_info_shallow_copy"),s._vscf_key_recipient_info_recipient_id=X("vscf_key_recipient_info_recipient_id"),s._vscf_key_recipient_info_key_encryption_algorithm=X("vscf_key_recipient_info_key_encryption_algorithm"),s._vscf_key_recipient_info_encrypted_key=X("vscf_key_recipient_info_encrypted_key"),s._vscf_key_recipient_info_list_new=X("vscf_key_recipient_info_list_new"),s._vscf_key_recipient_info_list_delete=X("vscf_key_recipient_info_list_delete"),s._vscf_key_recipient_info_list_shallow_copy=X("vscf_key_recipient_info_list_shallow_copy"),s._vscf_key_recipient_info_list_has_item=X("vscf_key_recipient_info_list_has_item"),s._vscf_key_recipient_info_list_item=X("vscf_key_recipient_info_list_item"),s._vscf_key_recipient_info_list_has_next=X("vscf_key_recipient_info_list_has_next"),s._vscf_key_recipient_info_list_next=X("vscf_key_recipient_info_list_next"),s._vscf_key_recipient_info_list_has_prev=X("vscf_key_recipient_info_list_has_prev"),s._vscf_key_recipient_info_list_prev=X("vscf_key_recipient_info_list_prev"),s._vscf_key_recipient_info_list_clear=X("vscf_key_recipient_info_list_clear"),s._vscf_message_info_new=X("vscf_message_info_new"),s._vscf_message_info_delete=X("vscf_message_info_delete"),s._vscf_message_info_shallow_copy=X("vscf_message_info_shallow_copy"),s._vscf_message_info_data_encryption_alg_info=X("vscf_message_info_data_encryption_alg_info"),s._vscf_message_info_key_recipient_info_list=X("vscf_message_info_key_recipient_info_list"),s._vscf_message_info_password_recipient_info_list=X("vscf_message_info_password_recipient_info_list"),s._vscf_message_info_has_custom_params=X("vscf_message_info_has_custom_params"),s._vscf_message_info_custom_params=X("vscf_message_info_custom_params"),s._vscf_message_info_has_cipher_kdf_alg_info=X("vscf_message_info_has_cipher_kdf_alg_info"),s._vscf_message_info_cipher_kdf_alg_info=X("vscf_message_info_cipher_kdf_alg_info"),s._vscf_message_info_has_cipher_padding_alg_info=X("vscf_message_info_has_cipher_padding_alg_info"),s._vscf_message_info_cipher_padding_alg_info=X("vscf_message_info_cipher_padding_alg_info"),s._vscf_message_info_has_footer_info=X("vscf_message_info_has_footer_info"),s._vscf_message_info_footer_info=X("vscf_message_info_footer_info"),s._vscf_message_info_clear=X("vscf_message_info_clear"),s._vscf_message_info_custom_params_new=X("vscf_message_info_custom_params_new"),s._vscf_message_info_custom_params_delete=X("vscf_message_info_custom_params_delete"),s._vscf_message_info_custom_params_shallow_copy=X("vscf_message_info_custom_params_shallow_copy"),s._vscf_message_info_custom_params_add_int=X("vscf_message_info_custom_params_add_int"),s._vscf_message_info_custom_params_add_string=X("vscf_message_info_custom_params_add_string"),s._vscf_message_info_custom_params_add_data=X("vscf_message_info_custom_params_add_data"),s._vscf_message_info_custom_params_clear=X("vscf_message_info_custom_params_clear"),s._vscf_message_info_custom_params_find_int=X("vscf_message_info_custom_params_find_int"),s._vscf_message_info_custom_params_find_string=X("vscf_message_info_custom_params_find_string"),s._vscf_message_info_custom_params_find_data=X("vscf_message_info_custom_params_find_data"),s._vscf_message_info_custom_params_has_params=X("vscf_message_info_custom_params_has_params"),s._vscf_message_info_editor_release_random=X("vscf_message_info_editor_release_random"),s._vscf_message_info_editor_new=X("vscf_message_info_editor_new"),s._vscf_message_info_editor_delete=X("vscf_message_info_editor_delete"),s._vscf_message_info_editor_shallow_copy=X("vscf_message_info_editor_shallow_copy"),s._vscf_message_info_editor_use_random=X("vscf_message_info_editor_use_random"),s._vscf_message_info_editor_setup_defaults=X("vscf_message_info_editor_setup_defaults"),s._vscf_message_info_editor_unpack=X("vscf_message_info_editor_unpack"),s._vscf_message_info_editor_unlock=X("vscf_message_info_editor_unlock"),s._vscf_message_info_editor_add_key_recipient=X("vscf_message_info_editor_add_key_recipient"),s._vscf_message_info_editor_remove_key_recipient=X("vscf_message_info_editor_remove_key_recipient"),s._vscf_message_info_editor_remove_all=X("vscf_message_info_editor_remove_all"),s._vscf_message_info_editor_packed_len=X("vscf_message_info_editor_packed_len"),s._vscf_message_info_editor_pack=X("vscf_message_info_editor_pack"),s._vscf_message_info_footer_new=X("vscf_message_info_footer_new"),s._vscf_message_info_footer_delete=X("vscf_message_info_footer_delete"),s._vscf_message_info_footer_shallow_copy=X("vscf_message_info_footer_shallow_copy"),s._vscf_message_info_footer_has_signer_infos=X("vscf_message_info_footer_has_signer_infos"),s._vscf_message_info_footer_signer_infos=X("vscf_message_info_footer_signer_infos"),s._vscf_message_info_footer_signer_hash_alg_info=X("vscf_message_info_footer_signer_hash_alg_info"),s._vscf_message_info_footer_signer_digest=X("vscf_message_info_footer_signer_digest"),s._vscf_oid_from_alg_id=X("vscf_oid_from_alg_id"),s._vscf_oid_to_alg_id=X("vscf_oid_to_alg_id"),s._vscf_oid_equal=X("vscf_oid_equal"),s._vscf_oid_from_id=X("vscf_oid_from_id"),s._vscf_oid_to_id=X("vscf_oid_to_id"),s._vscf_oid_id_to_alg_id=X("vscf_oid_id_to_alg_id"),s._vscf_padding_params_new=X("vscf_padding_params_new"),s._vscf_padding_params_new_with_constraints=X("vscf_padding_params_new_with_constraints"),s._vscf_padding_params_delete=X("vscf_padding_params_delete"),s._vscf_padding_params_shallow_copy=X("vscf_padding_params_shallow_copy"),s._vscf_padding_params_frame=X("vscf_padding_params_frame"),s._vscf_padding_params_frame_max=X("vscf_padding_params_frame_max"),s._vscf_password_recipient_info_new=X("vscf_password_recipient_info_new"),s._vscf_password_recipient_info_new_with_members=X("vscf_password_recipient_info_new_with_members"),s._vscf_password_recipient_info_delete=X("vscf_password_recipient_info_delete"),s._vscf_password_recipient_info_shallow_copy=X("vscf_password_recipient_info_shallow_copy"),s._vscf_password_recipient_info_key_encryption_algorithm=X("vscf_password_recipient_info_key_encryption_algorithm"),s._vscf_password_recipient_info_encrypted_key=X("vscf_password_recipient_info_encrypted_key"),s._vscf_password_recipient_info_list_new=X("vscf_password_recipient_info_list_new"),s._vscf_password_recipient_info_list_delete=X("vscf_password_recipient_info_list_delete"),s._vscf_password_recipient_info_list_shallow_copy=X("vscf_password_recipient_info_list_shallow_copy"),s._vscf_password_recipient_info_list_has_item=X("vscf_password_recipient_info_list_has_item"),s._vscf_password_recipient_info_list_item=X("vscf_password_recipient_info_list_item"),s._vscf_password_recipient_info_list_has_next=X("vscf_password_recipient_info_list_has_next"),s._vscf_password_recipient_info_list_next=X("vscf_password_recipient_info_list_next"),s._vscf_password_recipient_info_list_has_prev=X("vscf_password_recipient_info_list_has_prev"),s._vscf_password_recipient_info_list_prev=X("vscf_password_recipient_info_list_prev"),s._vscf_password_recipient_info_list_clear=X("vscf_password_recipient_info_list_clear"),s._vscf_pem_wrapped_len=X("vscf_pem_wrapped_len"),s._vscf_pem_wrap=X("vscf_pem_wrap"),s._vscf_pem_unwrapped_len=X("vscf_pem_unwrapped_len"),s._vscf_pem_unwrap=X("vscf_pem_unwrap"),s._vscf_pem_title=X("vscf_pem_title"),s._vscf_recipient_cipher_release_random=X("vscf_recipient_cipher_release_random"),s._vscf_recipient_cipher_release_encryption_cipher=X("vscf_recipient_cipher_release_encryption_cipher"),s._vscf_recipient_cipher_release_encryption_padding=X("vscf_recipient_cipher_release_encryption_padding"),s._vscf_recipient_cipher_release_padding_params=X("vscf_recipient_cipher_release_padding_params"),s._vscf_recipient_cipher_release_signer_hash=X("vscf_recipient_cipher_release_signer_hash"),s._vscf_recipient_cipher_new=X("vscf_recipient_cipher_new"),s._vscf_recipient_cipher_delete=X("vscf_recipient_cipher_delete"),s._vscf_recipient_cipher_shallow_copy=X("vscf_recipient_cipher_shallow_copy"),s._vscf_recipient_cipher_use_random=X("vscf_recipient_cipher_use_random"),s._vscf_recipient_cipher_use_encryption_cipher=X("vscf_recipient_cipher_use_encryption_cipher"),s._vscf_recipient_cipher_use_encryption_padding=X("vscf_recipient_cipher_use_encryption_padding"),s._vscf_recipient_cipher_use_padding_params=X("vscf_recipient_cipher_use_padding_params"),s._vscf_recipient_cipher_use_signer_hash=X("vscf_recipient_cipher_use_signer_hash"),s._vscf_recipient_cipher_has_key_recipient=X("vscf_recipient_cipher_has_key_recipient"),s._vscf_recipient_cipher_add_key_recipient=X("vscf_recipient_cipher_add_key_recipient"),s._vscf_recipient_cipher_clear_recipients=X("vscf_recipient_cipher_clear_recipients"),s._vscf_recipient_cipher_add_signer=X("vscf_recipient_cipher_add_signer"),s._vscf_recipient_cipher_clear_signers=X("vscf_recipient_cipher_clear_signers"),s._vscf_recipient_cipher_custom_params=X("vscf_recipient_cipher_custom_params"),s._vscf_recipient_cipher_start_encryption=X("vscf_recipient_cipher_start_encryption"),s._vscf_recipient_cipher_start_signed_encryption=X("vscf_recipient_cipher_start_signed_encryption"),s._vscf_recipient_cipher_message_info_len=X("vscf_recipient_cipher_message_info_len"),s._vscf_recipient_cipher_pack_message_info=X("vscf_recipient_cipher_pack_message_info"),s._vscf_recipient_cipher_encryption_out_len=X("vscf_recipient_cipher_encryption_out_len"),s._vscf_recipient_cipher_message_info_footer_len=X("vscf_recipient_cipher_message_info_footer_len"),s._vscf_recipient_cipher_process_encryption=X("vscf_recipient_cipher_process_encryption"),s._vscf_recipient_cipher_finish_encryption=X("vscf_recipient_cipher_finish_encryption"),s._vscf_recipient_cipher_start_decryption_with_key=X("vscf_recipient_cipher_start_decryption_with_key"),s._vscf_recipient_cipher_start_verified_decryption_with_key=X("vscf_recipient_cipher_start_verified_decryption_with_key"),s._vscf_recipient_cipher_decryption_out_len=X("vscf_recipient_cipher_decryption_out_len"),s._vscf_recipient_cipher_process_decryption=X("vscf_recipient_cipher_process_decryption"),s._vscf_recipient_cipher_finish_decryption=X("vscf_recipient_cipher_finish_decryption"),s._vscf_recipient_cipher_is_data_signed=X("vscf_recipient_cipher_is_data_signed"),s._vscf_recipient_cipher_signer_infos=X("vscf_recipient_cipher_signer_infos"),s._vscf_recipient_cipher_verify_signer_info=X("vscf_recipient_cipher_verify_signer_info"),s._vscf_recipient_cipher_pack_message_info_footer=X("vscf_recipient_cipher_pack_message_info_footer"),s._vscf_signed_data_info_new=X("vscf_signed_data_info_new"),s._vscf_signed_data_info_delete=X("vscf_signed_data_info_delete"),s._vscf_signed_data_info_shallow_copy=X("vscf_signed_data_info_shallow_copy"),s._vscf_signed_data_info_hash_alg_info=X("vscf_signed_data_info_hash_alg_info"),s._vscf_signer_release_hash=X("vscf_signer_release_hash"),s._vscf_signer_release_random=X("vscf_signer_release_random"),s._vscf_signer_new=X("vscf_signer_new"),s._vscf_signer_delete=X("vscf_signer_delete"),s._vscf_signer_shallow_copy=X("vscf_signer_shallow_copy"),s._vscf_signer_use_hash=X("vscf_signer_use_hash"),s._vscf_signer_use_random=X("vscf_signer_use_random"),s._vscf_signer_reset=X("vscf_signer_reset"),s._vscf_signer_append_data=X("vscf_signer_append_data"),s._vscf_signer_signature_len=X("vscf_signer_signature_len"),s._vscf_signer_sign=X("vscf_signer_sign"),s._vscf_signer_info_new=X("vscf_signer_info_new"),s._vscf_signer_info_delete=X("vscf_signer_info_delete"),s._vscf_signer_info_shallow_copy=X("vscf_signer_info_shallow_copy"),s._vscf_signer_info_signer_id=X("vscf_signer_info_signer_id"),s._vscf_signer_info_signer_alg_info=X("vscf_signer_info_signer_alg_info"),s._vscf_signer_info_signature=X("vscf_signer_info_signature"),s._vscf_signer_info_list_new=X("vscf_signer_info_list_new"),s._vscf_signer_info_list_delete=X("vscf_signer_info_list_delete"),s._vscf_signer_info_list_shallow_copy=X("vscf_signer_info_list_shallow_copy"),s._vscf_signer_info_list_has_item=X("vscf_signer_info_list_has_item"),s._vscf_signer_info_list_item=X("vscf_signer_info_list_item"),s._vscf_signer_info_list_has_next=X("vscf_signer_info_list_has_next"),s._vscf_signer_info_list_next=X("vscf_signer_info_list_next"),s._vscf_signer_info_list_has_prev=X("vscf_signer_info_list_has_prev"),s._vscf_signer_info_list_prev=X("vscf_signer_info_list_prev"),s._vscf_signer_info_list_clear=X("vscf_signer_info_list_clear"),s._vscf_verifier_new=X("vscf_verifier_new"),s._vscf_verifier_delete=X("vscf_verifier_delete"),s._vscf_verifier_shallow_copy=X("vscf_verifier_shallow_copy"),s._vscf_verifier_reset=X("vscf_verifier_reset"),s._vscf_verifier_append_data=X("vscf_verifier_append_data"),s._vscf_verifier_verify=X("vscf_verifier_verify"),s._vsc_buffer_new=X("vsc_buffer_new"),s._vsc_buffer_new_with_capacity=X("vsc_buffer_new_with_capacity"),s._vsc_buffer_delete=X("vsc_buffer_delete"),s._vsc_buffer_data=X("vsc_buffer_data"),s._vsc_buffer_make_secure=X("vsc_buffer_make_secure"),s._vsc_buffer_bytes=X("vsc_buffer_bytes"),s._vsc_buffer_len=X("vsc_buffer_len"),s._vsc_data_ctx_size=X("vsc_data_ctx_size"),s._vsc_data=X("vsc_data"),s._vsc_data_len=X("vsc_data_len"),s._vsc_data_bytes=X("vsc_data_bytes");var Ie=X("__errno_location"),Ae=s._fflush=X("fflush"),Ce=X("_emscripten_timeout");s._malloc=X("malloc"),s._free=X("free");var Te,Fe=function(){return(Fe=s.asm.emscripten_stack_init).apply(null,arguments)},Ke=function(){return(Ke=s.asm.emscripten_stack_get_end).apply(null,arguments)},Se=function(){return(Se=s.asm.emscripten_stack_get_current).apply(null,arguments)};function Le(){function e(){Te||(Te=!0,s.calledRun=!0,E||(w(!T),T=!0,N(),s.noFSInit||Pe.init.initialized||Pe.init(),Pe.ignorePermissions=!1,ee(A),t(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),w(!s._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(N(),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)e=s.postRun.shift(),C.unshift(e);var e;ee(C)}()))}S>0||(function(){var e;Fe(),w(0==(3&(e=Ke()))),0==e&&(e+=4),x[e>>2]=34821223,x[e+4>>2]=2310721022,x[0]=1668509029}(),function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)e=s.preRun.shift(),I.unshift(e);var e;ee(I)}(),S>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),e()}),1)):e(),N()))}if(s.dynCall_jiji=X("dynCall_jiji"),s.dynCall_iij=X("dynCall_iij"),s.dynCall_ji=X("dynCall_ji"),["isLeapYear","ydayFromDate","arraySum","addDays","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","traverseStack","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","runtimeKeepalivePush","runtimeKeepalivePop","safeSetTimeout","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","stringToUTF8","intArrayToString","AsciiToString","stringToAscii","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","getSocketFromFD","getSocketAddress","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","getEnvStrings","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","setMainLoop","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",_=e;_.startsWith("_")||(_="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE="+_+")",$(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),_e(t)}}),J(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createPreloadedFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","out","err","callMain","abort","keepRuntimeAlive","wasmMemory","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","ptrToString","zeroMemory","exitJS","getHeapMax","emscripten_realloc_buffer","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","handleException","callUserCallback","maybeExit","asyncLoad","alignMemory","mmapAlloc","convertI32PairToI53Checked","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","lengthBytesUTF8","intArrayFromString","UTF16Decoder","SYSCALLS","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","ExitStatus","doReadv","doWritev","dlopenMissingError","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","wget","FS","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","GLFW","allocateUTF8","allocateUTF8OnStack"].forEach(J),R=function e(){Te||Le(),Te||(R=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return Le(),e.ready});e.exports=r}(s);var n=s.exports,c={};function a(e,t){if(!("number"==typeof t||t instanceof Number))throw new TypeError(`'${e}' is not a number`);if(Number.isNaN(t))throw new TypeError(`'${e}' is NaN`);if(t===1/0)throw new TypeError(`'${e}' is Infinity`);if(t===-1/0)throw new TypeError(`'${e}' is -Infinity`)}function i(e,t){if(a(e,t),0==t)throw new TypeError(`'${e}' is NULL`)}c.ensureNumber=a,c.ensureString=function(e,t){if(!("string"==typeof t||t instanceof String))throw new TypeError(`'${e}' is not a string`)},c.ensureBoolean=function(e,t){if("boolean"!=typeof t)throw new TypeError(`'${e}' is not a boolean`)},c.ensureByteArray=function(e,t){if(!(t instanceof Uint8Array))throw new TypeError(`'${e}' is not an Uint8Array`)},c.ensureClass=function(e,t,_){if(!(t instanceof _))throw new TypeError(`'${e}' is not an instance of the class ${_.name}`);i(e,t.ctxPtr)},c.ensureNotNull=i,c.ensureImplementInterface=function(e,t,_,r,s){if(i(e,t.ctxPtr),!s.isImplemented(t.ctxPtr,r))throw new TypeError(`'${e}' does not implement interface '${_}'`)};const o=c,l=c,f=c,d=c,u=c,v=c,h=c,p=c,y=c,P=c,m=c,g=c,x=c,k=c,E=c,w=c,b=c,N=c,I=c,A=c,C=c,T=c,F=c,K=c,S=c,L=c,R=c,z=c,D=c,U=c,M=c,B=c,O=c,Y=c,H=c,G=c,V=c,W=c,X=c,j=c,q=c,Z=c,$=c,J=c,Q=c,ee=c,te=c,_e=c,re=c,se=c,ne=c,ce=c,ae=c,ie=c,oe=c,le=c,fe=c,de=c,ue=c,ve=c,he=c,pe=c,ye=c,Pe=c,me=c,ge=c,xe=c,ke=c,Ee=c,we=c,be=c,Ne=c,Ie=c,Ae=c,Ce=c,Te=c,Fe=c,Ke=c,Se=c,Le=c,Re=c,ze=c,De=n,Ue=(e,t)=>Object.freeze({ALG:1,ALG_INFO:2,ALG_INFO_DESERIALIZER:3,ALG_INFO_SERIALIZER:4,ASN1_READER:5,ASN1_WRITER:6,AUTH_DECRYPT:7,AUTH_ENCRYPT:8,CIPHER:9,CIPHER_AUTH:10,CIPHER_AUTH_INFO:11,CIPHER_INFO:12,COMPUTE_SHARED_KEY:13,DECRYPT:14,ENCRYPT:15,ENTROPY_SOURCE:16,HASH:17,KDF:18,KEM:19,KEY:20,KEY_ALG:21,KEY_CIPHER:22,KEY_DESERIALIZER:23,KEY_SERIALIZER:24,KEY_SIGNER:25,MAC:26,MESSAGE_INFO_FOOTER_SERIALIZER:27,MESSAGE_INFO_SERIALIZER:28,PADDING:29,PRIVATE_KEY:30,PUBLIC_KEY:31,RANDOM:32,SALTED_KDF:33}),Me=(e,t)=>class{static newAndTakeCContext(_){const r=e._vscf_impl_tag(_);switch(r){case t.FoundationImplTag.SHA224:return t.Sha224.newAndTakeCContext(_);case t.FoundationImplTag.SHA256:return t.Sha256.newAndTakeCContext(_);case t.FoundationImplTag.SHA384:return t.Sha384.newAndTakeCContext(_);case t.FoundationImplTag.SHA512:return t.Sha512.newAndTakeCContext(_);case t.FoundationImplTag.AES256_GCM:return t.Aes256Gcm.newAndTakeCContext(_);case t.FoundationImplTag.AES256_CBC:return t.Aes256Cbc.newAndTakeCContext(_);case t.FoundationImplTag.ASN1RD:return t.Asn1rd.newAndTakeCContext(_);case t.FoundationImplTag.ASN1WR:return t.Asn1wr.newAndTakeCContext(_);case t.FoundationImplTag.RSA_PUBLIC_KEY:return t.RsaPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.RSA_PRIVATE_KEY:return t.RsaPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.RSA:return t.Rsa.newAndTakeCContext(_);case t.FoundationImplTag.ECC_PUBLIC_KEY:return t.EccPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.ECC_PRIVATE_KEY:return t.EccPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.ECC:return t.Ecc.newAndTakeCContext(_);case t.FoundationImplTag.ENTROPY_ACCUMULATOR:return t.EntropyAccumulator.newAndTakeCContext(_);case t.FoundationImplTag.CTR_DRBG:return t.CtrDrbg.newAndTakeCContext(_);case t.FoundationImplTag.HMAC:return t.Hmac.newAndTakeCContext(_);case t.FoundationImplTag.HKDF:return t.Hkdf.newAndTakeCContext(_);case t.FoundationImplTag.KDF1:return t.Kdf1.newAndTakeCContext(_);case t.FoundationImplTag.KDF2:return t.Kdf2.newAndTakeCContext(_);case t.FoundationImplTag.FAKE_RANDOM:return t.FakeRandom.newAndTakeCContext(_);case t.FoundationImplTag.PKCS5_PBKDF2:return t.Pkcs5Pbkdf2.newAndTakeCContext(_);case t.FoundationImplTag.PKCS5_PBES2:return t.Pkcs5Pbes2.newAndTakeCContext(_);case t.FoundationImplTag.SEED_ENTROPY_SOURCE:return t.SeedEntropySource.newAndTakeCContext(_);case t.FoundationImplTag.KEY_MATERIAL_RNG:return t.KeyMaterialRng.newAndTakeCContext(_);case t.FoundationImplTag.RAW_PUBLIC_KEY:return t.RawPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.RAW_PRIVATE_KEY:return t.RawPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.PKCS8_SERIALIZER:return t.Pkcs8Serializer.newAndTakeCContext(_);case t.FoundationImplTag.SEC1_SERIALIZER:return t.Sec1Serializer.newAndTakeCContext(_);case t.FoundationImplTag.KEY_ASN1_SERIALIZER:return t.KeyAsn1Serializer.newAndTakeCContext(_);case t.FoundationImplTag.KEY_ASN1_DESERIALIZER:return t.KeyAsn1Deserializer.newAndTakeCContext(_);case t.FoundationImplTag.ED25519:return t.Ed25519.newAndTakeCContext(_);case t.FoundationImplTag.CURVE25519:return t.Curve25519.newAndTakeCContext(_);case t.FoundationImplTag.FALCON:return t.Falcon.newAndTakeCContext(_);case t.FoundationImplTag.ROUND5:return t.Round5.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_KEY_ALG_INFO:return t.CompoundKeyAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_PUBLIC_KEY:return t.CompoundPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_PRIVATE_KEY:return t.CompoundPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.COMPOUND_KEY_ALG:return t.CompoundKeyAlg.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_KEY_ALG_INFO:return t.HybridKeyAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_PUBLIC_KEY:return t.HybridPublicKey.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_PRIVATE_KEY:return t.HybridPrivateKey.newAndTakeCContext(_);case t.FoundationImplTag.HYBRID_KEY_ALG:return t.HybridKeyAlg.newAndTakeCContext(_);case t.FoundationImplTag.SIMPLE_ALG_INFO:return t.SimpleAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.HASH_BASED_ALG_INFO:return t.HashBasedAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.CIPHER_ALG_INFO:return t.CipherAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.SALTED_KDF_ALG_INFO:return t.SaltedKdfAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.PBE_ALG_INFO:return t.PbeAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.ECC_ALG_INFO:return t.EccAlgInfo.newAndTakeCContext(_);case t.FoundationImplTag.ALG_INFO_DER_SERIALIZER:return t.AlgInfoDerSerializer.newAndTakeCContext(_);case t.FoundationImplTag.ALG_INFO_DER_DESERIALIZER:return t.AlgInfoDerDeserializer.newAndTakeCContext(_);case t.FoundationImplTag.MESSAGE_INFO_DER_SERIALIZER:return t.MessageInfoDerSerializer.newAndTakeCContext(_);case t.FoundationImplTag.RANDOM_PADDING:return t.RandomPadding.newAndTakeCContext(_);default:throw new Error("Unexpected implementation tag found: "+r)}}static newAndUseCContext(_){return new t.FoundationInterface.newAndTakeCContext(e._vscf_impl_shallow_copy(_))}static isImplemented(t,_){return 0!=e._vscf_impl_api(t,_)}},Be=(e,t)=>Object.freeze({AES256_CBC:1,AES256_GCM:2,ALG_INFO_DER_DESERIALIZER:3,ALG_INFO_DER_SERIALIZER:4,ASN1RD:5,ASN1WR:6,CIPHER_ALG_INFO:7,COMPOUND_KEY_ALG:8,COMPOUND_KEY_ALG_INFO:9,COMPOUND_PRIVATE_KEY:10,COMPOUND_PUBLIC_KEY:11,CTR_DRBG:12,CURVE25519:13,ECC:14,ECC_ALG_INFO:15,ECC_PRIVATE_KEY:16,ECC_PUBLIC_KEY:17,ED25519:18,ENTROPY_ACCUMULATOR:19,FAKE_RANDOM:20,FALCON:21,HASH_BASED_ALG_INFO:22,HKDF:23,HMAC:24,HYBRID_KEY_ALG:25,HYBRID_KEY_ALG_INFO:26,HYBRID_PRIVATE_KEY:27,HYBRID_PUBLIC_KEY:28,KDF1:29,KDF2:30,KEY_ASN1_DESERIALIZER:31,KEY_ASN1_SERIALIZER:32,KEY_MATERIAL_RNG:33,MESSAGE_INFO_DER_SERIALIZER:34,PBE_ALG_INFO:35,PKCS5_PBES2:36,PKCS5_PBKDF2:37,PKCS8_SERIALIZER:38,RANDOM_PADDING:39,RAW_PRIVATE_KEY:40,RAW_PUBLIC_KEY:41,ROUND5:42,RSA:43,RSA_PRIVATE_KEY:44,RSA_PUBLIC_KEY:45,SALTED_KDF_ALG_INFO:46,SEC1_SERIALIZER:47,SEED_ENTROPY_SOURCE:48,SHA224:49,SHA256:50,SHA384:51,SHA512:52,SIMPLE_ALG_INFO:53}),Oe=(e,t)=>{class _ extends Error{constructor(e){super(e),this.name="FoundationError",this.message=e}static handleStatusCode(e){if(0!=e){if(-1==e)throw new _("This error should not be returned if assertions is enabled.");if(-2==e)throw new _("Can be used to define that not all context prerequisites are satisfied. Note, this error should not be returned if assertions is enabled.");if(-3==e)throw new _("Define that error code from one of third-party module was not handled. Note, this error should not be returned if assertions is enabled.");if(-101==e)throw new _("Buffer capacity is not enough to hold result.");if(-200==e)throw new _("Unsupported algorithm.");if(-201==e)throw new _("Authentication failed during decryption.");if(-202==e)throw new _("Attempt to read data out of buffer bounds.");if(-203==e)throw new _("ASN.1 encoded data is corrupted.");if(-204==e)throw new _("Attempt to read ASN.1 type that is bigger then requested C type.");if(-205==e)throw new _("ASN.1 representation of PKCS#1 public key is corrupted.");if(-206==e)throw new _("ASN.1 representation of PKCS#1 private key is corrupted.");if(-207==e)throw new _("ASN.1 representation of PKCS#8 public key is corrupted.");if(-208==e)throw new _("ASN.1 representation of PKCS#8 private key is corrupted.");if(-209==e)throw new _("Encrypted data is corrupted.");if(-210==e)throw new _("Underlying random operation returns error.");if(-211==e)throw new _("Generation of the private or secret key failed.");if(-212==e)throw new _("One of the entropy sources failed.");if(-213==e)throw new _("Requested data to be generated is too big.");if(-214==e)throw new _("Base64 encoded string contains invalid characters.");if(-215==e)throw new _("PEM data is corrupted.");if(-216==e)throw new _("Exchange key return zero.");if(-217==e)throw new _("Ed25519 public key is corrupted.");if(-218==e)throw new _("Ed25519 private key is corrupted.");if(-219==e)throw new _("CURVE25519 public key is corrupted.");if(-220==e)throw new _("CURVE25519 private key is corrupted.");if(-221==e)throw new _("Elliptic curve public key format is corrupted see RFC 5480.");if(-222==e)throw new _("Elliptic curve public key format is corrupted see RFC 5915.");if(-223==e)throw new _("ASN.1 representation of a public key is corrupted.");if(-224==e)throw new _("ASN.1 representation of a private key is corrupted.");if(-225==e)throw new _("Key algorithm does not accept given type of public key.");if(-226==e)throw new _("Key algorithm does not accept given type of private key.");if(-227==e)throw new _("Post-quantum Falcon-Sign public key is corrupted.");if(-228==e)throw new _("Post-quantum Falcon-Sign private key is corrupted.");if(-229==e)throw new _("Generic Round5 library error.");if(-230==e)throw new _("Post-quantum NIST Round5 public key is corrupted.");if(-231==e)throw new _("Post-quantum NIST Round5 private key is corrupted.");if(-232==e)throw new _("Compound public key is corrupted.");if(-233==e)throw new _("Compound private key is corrupted.");if(-234==e)throw new _("Compound public hybrid key is corrupted.");if(-235==e)throw new _("Compound private hybrid key is corrupted.");if(-236==e)throw new _("ASN.1 AlgorithmIdentifer is corrupted.");if(-237==e)throw new _("ASN.1 AlgorithmIdentifer with ECParameters is corrupted.");if(-238==e)throw new _("ASN.1 AlgorithmIdentifer with CompoundKeyParams is corrupted.");if(-239==e)throw new _("ASN.1 AlgorithmIdentifer with HybridKeyParams is corrupted.");if(-301==e)throw new _("Decryption failed, because message info was not given explicitly, and was not part of an encrypted message.");if(-302==e)throw new _("Message Info is corrupted.");if(-303==e)throw new _("Recipient defined with id is not found within message info during data decryption.");if(-304==e)throw new _("Content encryption key can not be decrypted with a given private key.");if(-305==e)throw new _("Content encryption key can not be decrypted with a given password.");if(-306==e)throw new _("Custom parameter with a given key is not found within message info.");if(-307==e)throw new _("A custom parameter with a given key is found, but the requested value type does not correspond to the actual type.");if(-308==e)throw new _("Signature format is corrupted.");if(-309==e)throw new _("Message Info footer is corrupted.");if(-401==e)throw new _("Brainkey password length is out of range.");if(-402==e)throw new _("Brainkey number length should be 32 byte.");if(-403==e)throw new _("Brainkey point length should be 65 bytes.");if(-404==e)throw new _("Brainkey name is out of range.");if(-405==e)throw new _("Brainkey internal error.");if(-406==e)throw new _("Brainkey point is invalid.");if(-407==e)throw new _("Brainkey number buffer length capacity should be >= 32 byte.");if(-408==e)throw new _("Brainkey point buffer length capacity should be >= 32 byte.");if(-409==e)throw new _("Brainkey seed buffer length capacity should be >= 32 byte.");if(-410==e)throw new _("Brainkey identity secret is invalid.");if(-411==e)throw new _("KEM encapsulated key is invalid or does not correspond to the private key.");if(-501==e)throw new _("Invalid padding.");if(-601==e)throw new _("Protobuf error.");if(-701==e)throw new _("Session id doesnt match.");if(-702==e)throw new _("Epoch not found.");if(-703==e)throw new _("Wrong key type.");if(-704==e)throw new _("Invalid signature.");if(-705==e)throw new _("Ed25519 error.");if(-706==e)throw new _("Duplicate epoch.");if(-707==e)throw new _("Plain text too long.");throw new _("Unexpected status code:"+e)}}}return _},Ye=(e,t)=>Object.freeze({BOOLEAN:0,INTEGER:1,BIT_STRING:2,OCTET_STRING:3,NULL:4,OID:5,UTF8_STRING:6,SEQUENCE:7,SET:8,PRINTABLE_STRING:9,T61_STRING:10,IA5_STRING:11,UTC_TIME:12,GENERALIZED_TIME:13,UNIVERSAL_STRING:14,BMP_STRING:15,PRIMITIVE:16,CONSTRUCTED:17,CONTEXT_SPECIFIC:18}),He=(e,t)=>Object.freeze({NONE:0,SHA224:1,SHA256:2,SHA384:3,SHA512:4,KDF1:5,KDF2:6,RSA:7,ED25519:8,CURVE25519:9,SECP256R1:10,AES256_GCM:11,AES256_CBC:12,HMAC:13,HKDF:14,PKCS5_PBKDF2:15,PKCS5_PBES2:16,COMPOUND_KEY:17,HYBRID_KEY:18,FALCON:19,ROUND5_ND_1CCA_5D:20,RANDOM_PADDING:21}),Ge=(e,t)=>Object.freeze({NONE:0,RSA:1,ED25519:2,CURVE25519:3,SHA224:4,SHA256:5,SHA384:6,SHA512:7,KDF1:8,KDF2:9,AES256_GCM:10,AES256_CBC:11,PKCS5_PBKDF2:12,PKCS5_PBES2:13,CMS_DATA:14,CMS_ENVELOPED_DATA:15,HKDF_WITH_SHA256:16,HKDF_WITH_SHA384:17,HKDF_WITH_SHA512:18,HMAC_WITH_SHA224:19,HMAC_WITH_SHA256:20,HMAC_WITH_SHA384:21,HMAC_WITH_SHA512:22,EC_GENERIC_KEY:23,EC_DOMAIN_SECP256R1:24,COMPOUND_KEY:25,HYBRID_KEY:26,FALCON:27,ROUND5_ND_1CCA_5D:28,RANDOM_PADDING:29}),Ve=(e,t)=>Object.freeze({GROUP_INFO:0,REGULAR:1}),We=(e,t)=>Object.freeze({INITIAL:0,ENCRYPTION:1,DECRYPTION:2}),Xe=(e,t)=>{class _{constructor(t){this.name="MessageInfo",this.ctxPtr=void 0===t?e._vscf_message_info_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_delete(this.ctxPtr),this.ctxPtr=null)}dataEncryptionAlgInfo(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_data_encryption_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}keyRecipientInfoList(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_key_recipient_info_list(this.ctxPtr),t.KeyRecipientInfoList.newAndUseCContext(_)}passwordRecipientInfoList(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_password_recipient_info_list(this.ctxPtr),t.PasswordRecipientInfoList.newAndUseCContext(_)}hasCustomParams(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_custom_params(this.ctxPtr),!!t}customParams(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_custom_params(this.ctxPtr),t.MessageInfoCustomParams.newAndUseCContext(_)}hasCipherKdfAlgInfo(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_cipher_kdf_alg_info(this.ctxPtr),!!t}cipherKdfAlgInfo(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_cipher_kdf_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}hasCipherPaddingAlgInfo(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_cipher_padding_alg_info(this.ctxPtr),!!t}cipherPaddingAlgInfo(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_cipher_padding_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}hasFooterInfo(){let t;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_has_footer_info(this.ctxPtr),!!t}footerInfo(){let _;return d.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_info(this.ctxPtr),t.FooterInfo.newAndUseCContext(_)}clear(){d.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_clear(this.ctxPtr)}}return _},je=(e,t)=>{class _{constructor(t){this.name="KeyRecipientInfo",this.ctxPtr=void 0===t?e._vscf_key_recipient_info_new():t}static newAndUseCContext(t){return new _(e._vscf_key_recipient_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_recipient_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithData(r,s,n){u.ensureByteArray("recipientId",r),u.ensureImplementInterface("keyEncryptionAlgorithm",s,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),u.ensureByteArray("encryptedKey",n);const c=r.length*r.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(r,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),v=e._malloc(d);let h;e._vsc_data(v,f,l);try{return h=e._vscf_key_recipient_info_new_with_data(o,s.ctxPtr,v),_.newAndTakeCContext(h)}finally{e._free(a),e._free(o),e._free(f),e._free(v)}}recipientId(){u.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_key_recipient_info_recipient_id(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}keyEncryptionAlgorithm(){let _;return u.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_key_encryption_algorithm(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}encryptedKey(){u.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_key_recipient_info_encrypted_key(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},qe=(e,t)=>{class _{constructor(t){this.name="KeyRecipientInfoList",this.ctxPtr=void 0===t?e._vscf_key_recipient_info_list_new():t}static newAndUseCContext(t){return new _(e._vscf_key_recipient_info_list_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_recipient_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_item(this.ctxPtr),!!t}item(){let _;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_key_recipient_info_list_item(this.ctxPtr),t.KeyRecipientInfo.newAndUseCContext(_)}hasNext(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_next(this.ctxPtr),!!t}next(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_next(this.ctxPtr),_.newAndUseCContext(t)}hasPrev(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return v.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_recipient_info_list_prev(this.ctxPtr),_.newAndUseCContext(t)}clear(){v.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_recipient_info_list_clear(this.ctxPtr)}}return _},Ze=(e,t)=>{class _{constructor(t){this.name="PasswordRecipientInfo",this.ctxPtr=void 0===t?e._vscf_password_recipient_info_new():t}static newAndUseCContext(t){return new _(e._vscf_password_recipient_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_password_recipient_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithMembers(r,s){h.ensureImplementInterface("keyEncryptionAlgorithm",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),h.ensureByteArray("encryptedKey",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);let o;e._vsc_data(i,c,n);try{return o=e._vscf_password_recipient_info_new_with_members(r.ctxPtr,i),_.newAndTakeCContext(o)}finally{e._free(c),e._free(i)}}keyEncryptionAlgorithm(){let _;return h.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_key_encryption_algorithm(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}encryptedKey(){h.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_password_recipient_info_encrypted_key(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},$e=(e,t)=>{class _{constructor(t){this.name="PasswordRecipientInfoList",this.ctxPtr=void 0===t?e._vscf_password_recipient_info_list_new():t}static newAndUseCContext(t){return new _(e._vscf_password_recipient_info_list_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_password_recipient_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let t;return p.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_item(this.ctxPtr),!!t}item(){let _;return p.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_password_recipient_info_list_item(this.ctxPtr),t.PasswordRecipientInfo.newAndUseCContext(_)}hasNext(){let t;return p.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_next(this.ctxPtr),!!t}next(){let t;return p.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_next(this.ctxPtr),_.newAndUseCContext(t)}hasPrev(){let t;return p.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return p.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_password_recipient_info_list_prev(this.ctxPtr),_.newAndUseCContext(t)}clear(){p.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_password_recipient_info_list_clear(this.ctxPtr)}}return _},Je=(e,t)=>{class _{constructor(t){this.name="Ecies",this.ctxPtr=void 0===t?e._vscf_ecies_new():t}static newAndUseCContext(t){return new _(e._vscf_ecies_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecies_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_ecies_release_random(this.ctxPtr),e._vscf_ecies_use_random(this.ctxPtr,_.ctxPtr)}set cipher(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("cipher",_,"Foundation.Cipher",t.FoundationInterfaceTag.CIPHER,t.FoundationInterface),e._vscf_ecies_release_cipher(this.ctxPtr),e._vscf_ecies_use_cipher(this.ctxPtr,_.ctxPtr)}set mac(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("mac",_,"Foundation.Mac",t.FoundationInterfaceTag.MAC,t.FoundationInterface),e._vscf_ecies_release_mac(this.ctxPtr),e._vscf_ecies_use_mac(this.ctxPtr,_.ctxPtr)}set kdf(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("kdf",_,"Foundation.Kdf",t.FoundationInterfaceTag.KDF,t.FoundationInterface),e._vscf_ecies_release_kdf(this.ctxPtr),e._vscf_ecies_use_kdf(this.ctxPtr,_.ctxPtr)}set ephemeralKey(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("ephemeralKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),e._vscf_ecies_release_ephemeral_key(this.ctxPtr),e._vscf_ecies_use_ephemeral_key(this.ctxPtr,_.ctxPtr)}setKeyAlg(_){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("keyAlg",_,"Foundation.KeyAlg",t.FoundationInterfaceTag.KEY_ALG,t.FoundationInterface),e._vscf_ecies_set_key_alg(this.ctxPtr,_.ctxPtr)}releaseKeyAlg(){m.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ecies_release_key_alg(this.ctxPtr)}setupDefaults(){m.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ecies_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setupDefaultsNoRandom(){m.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ecies_setup_defaults_no_random(this.ctxPtr)}encryptedLen(_,r){let s;return m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),m.ensureNumber("dataLen",r),s=e._vscf_ecies_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),m.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_ecies_encrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}decryptedLen(_,r){let s;return m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),m.ensureNumber("dataLen",r),s=e._vscf_ecies_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){m.ensureNotNull("this.ctxPtr",this.ctxPtr),m.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),m.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_ecies_decrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}}return _},Qe=(e,t)=>{class _{constructor(t){this.name="RecipientCipher",this.ctxPtr=void 0===t?e._vscf_recipient_cipher_new():t}static newAndUseCContext(t){return new _(e._vscf_recipient_cipher_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_recipient_cipher_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_recipient_cipher_release_random(this.ctxPtr),e._vscf_recipient_cipher_use_random(this.ctxPtr,_.ctxPtr)}set encryptionCipher(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureImplementInterface("encryptionCipher",_,"Foundation.Cipher",t.FoundationInterfaceTag.CIPHER,t.FoundationInterface),e._vscf_recipient_cipher_release_encryption_cipher(this.ctxPtr),e._vscf_recipient_cipher_use_encryption_cipher(this.ctxPtr,_.ctxPtr)}set encryptionPadding(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureImplementInterface("encryptionPadding",_,"Foundation.Padding",t.FoundationInterfaceTag.PADDING,t.FoundationInterface),e._vscf_recipient_cipher_release_encryption_padding(this.ctxPtr),e._vscf_recipient_cipher_use_encryption_padding(this.ctxPtr,_.ctxPtr)}set paddingParams(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureClass("paddingParams",_,t.PaddingParams),e._vscf_recipient_cipher_release_padding_params(this.ctxPtr),e._vscf_recipient_cipher_use_padding_params(this.ctxPtr,_.ctxPtr)}set signerHash(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureImplementInterface("signerHash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_recipient_cipher_release_signer_hash(this.ctxPtr),e._vscf_recipient_cipher_use_signer_hash(this.ctxPtr,_.ctxPtr)}hasKeyRecipient(t){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("recipientId",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_recipient_cipher_has_key_recipient(this.ctxPtr,n),!!c}finally{e._free(r),e._free(n)}}addKeyRecipient(_,r){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("recipientId",_),g.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);try{e._vscf_recipient_cipher_add_key_recipient(this.ctxPtr,a,r.ctxPtr)}finally{e._free(n),e._free(a)}}clearRecipients(){g.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_recipient_cipher_clear_recipients(this.ctxPtr)}addSigner(_,r){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("signerId",_),g.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);try{const _=e._vscf_recipient_cipher_add_signer(this.ctxPtr,a,r.ctxPtr);t.FoundationError.handleStatusCode(_)}finally{e._free(n),e._free(a)}}clearSigners(){g.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_recipient_cipher_clear_signers(this.ctxPtr)}customParams(){let _;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_recipient_cipher_custom_params(this.ctxPtr),t.MessageInfoCustomParams.newAndUseCContext(_)}startEncryption(){g.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_recipient_cipher_start_encryption(this.ctxPtr);t.FoundationError.handleStatusCode(_)}startSignedEncryption(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureNumber("dataSize",_);const r=e._vscf_recipient_cipher_start_signed_encryption(this.ctxPtr,_);t.FoundationError.handleStatusCode(r)}messageInfoLen(){let t;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_message_info_len(this.ctxPtr),t}packMessageInfo(){g.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.messageInfoLen(),_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_recipient_cipher_pack_message_info(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}encryptionOutLen(t){let _;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureNumber("dataLen",t),_=e._vscf_recipient_cipher_encryption_out_len(this.ctxPtr,t),_}processEncryption(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.encryptionOutLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_recipient_cipher_process_encryption(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}finishEncryption(){g.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.encryptionOutLen(0),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_recipient_cipher_finish_encryption(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}startDecryptionWithKey(_,r,s){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("recipientId",_),g.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),g.ensureByteArray("messageInfo",s);const n=_.length*_.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(_,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);e._vsc_data(i,c,n);const o=s.length*s.BYTES_PER_ELEMENT,l=e._malloc(o);e.HEAP8.set(s,l);const f=e._vsc_data_ctx_size(),d=e._malloc(f);e._vsc_data(d,l,o);try{const _=e._vscf_recipient_cipher_start_decryption_with_key(this.ctxPtr,i,r.ctxPtr,d);t.FoundationError.handleStatusCode(_)}finally{e._free(c),e._free(i),e._free(l),e._free(d)}}startVerifiedDecryptionWithKey(_,r,s,n){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("recipientId",_),g.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),g.ensureByteArray("messageInfo",s),g.ensureByteArray("messageInfoFooter",n);const c=_.length*_.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(_,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=s.length*s.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(s,f);const d=e._vsc_data_ctx_size(),u=e._malloc(d);e._vsc_data(u,f,l);const v=n.length*n.BYTES_PER_ELEMENT,h=e._malloc(v);e.HEAP8.set(n,h);const p=e._vsc_data_ctx_size(),y=e._malloc(p);e._vsc_data(y,h,v);try{const _=e._vscf_recipient_cipher_start_verified_decryption_with_key(this.ctxPtr,o,r.ctxPtr,u,y);t.FoundationError.handleStatusCode(_)}finally{e._free(a),e._free(o),e._free(f),e._free(u),e._free(h),e._free(y)}}decryptionOutLen(t){let _;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureNumber("dataLen",t),_=e._vscf_recipient_cipher_decryption_out_len(this.ctxPtr,t),_}processDecryption(_){g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.decryptionOutLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_recipient_cipher_process_decryption(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}finishDecryption(){g.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.decryptionOutLen(0),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_recipient_cipher_finish_decryption(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}isDataSigned(){let t;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_is_data_signed(this.ctxPtr),!!t}signerInfos(){let _;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_recipient_cipher_signer_infos(this.ctxPtr),t.SignerInfoList.newAndUseCContext(_)}verifySignerInfo(_,r){let s;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),g.ensureClass("signerInfo",_,t.SignerInfo),g.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),s=e._vscf_recipient_cipher_verify_signer_info(this.ctxPtr,_.ctxPtr,r.ctxPtr),!!s}messageInfoFooterLen(){let t;return g.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_recipient_cipher_message_info_footer_len(this.ctxPtr),t}packMessageInfoFooter(){g.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.messageInfoFooterLen(),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_recipient_cipher_pack_message_info_footer(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}}return _},et=(e,t)=>{class _{constructor(t){this.name="MessageInfoCustomParams",this.ctxPtr=void 0===t?e._vscf_message_info_custom_params_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_custom_params_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_custom_params_delete(this.ctxPtr),this.ctxPtr=null)}addInt(t,_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("key",t),x.ensureNumber("value",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{e._vscf_message_info_custom_params_add_int(this.ctxPtr,c,_)}finally{e._free(s),e._free(c)}}addString(t,_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("key",t),x.ensureByteArray("value",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=_.length*_.BYTES_PER_ELEMENT,i=e._malloc(a);e.HEAP8.set(_,i);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,i,a);try{e._vscf_message_info_custom_params_add_string(this.ctxPtr,c,l)}finally{e._free(s),e._free(c),e._free(i),e._free(l)}}addData(t,_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("key",t),x.ensureByteArray("value",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=_.length*_.BYTES_PER_ELEMENT,i=e._malloc(a);e.HEAP8.set(_,i);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,i,a);try{e._vscf_message_info_custom_params_add_data(this.ctxPtr,c,l)}finally{e._free(s),e._free(c),e._free(i),e._free(l)}}clear(){x.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_custom_params_clear(this.ctxPtr)}findInt(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);let o;e._vscf_error_reset(i);try{o=e._vscf_message_info_custom_params_find_int(this.ctxPtr,c,i);const _=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(_),o}finally{e._free(s),e._free(c),e._free(i)}}findString(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);e._vscf_error_reset(i);const o=e._vsc_data_ctx_size(),l=e._malloc(o);try{e._vscf_message_info_custom_params_find_string(l,this.ctxPtr,c,i);const _=e._vscf_error_status(i);t.FoundationError.handleStatusCode(_);const r=e._vsc_data_len(l),s=e._vsc_data_bytes(l);return e.HEAPU8.slice(s,s+r)}finally{e._free(s),e._free(c),e._free(i),e._free(l)}}findData(_){x.ensureNotNull("this.ctxPtr",this.ctxPtr),x.ensureByteArray("key",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);e._vscf_error_reset(i);const o=e._vsc_data_ctx_size(),l=e._malloc(o);try{e._vscf_message_info_custom_params_find_data(l,this.ctxPtr,c,i);const _=e._vscf_error_status(i);t.FoundationError.handleStatusCode(_);const r=e._vsc_data_len(l),s=e._vsc_data_bytes(l);return e.HEAPU8.slice(s,s+r)}finally{e._free(s),e._free(c),e._free(i),e._free(l)}}hasParams(){let t;return x.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_custom_params_has_params(this.ctxPtr),!!t}}return _},tt=(e,t)=>{class _{constructor(t){this.name="KeyProvider",this.ctxPtr=void 0===t?e._vscf_key_provider_new():t}static newAndUseCContext(t){return new _(e._vscf_key_provider_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_provider_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_key_provider_release_random(this.ctxPtr),e._vscf_key_provider_use_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){k.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_key_provider_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setRsaParams(t){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureNumber("bitlen",t),e._vscf_key_provider_set_rsa_params(this.ctxPtr,t)}generatePrivateKey(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureNumber("algId",_);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_key_provider_generate_private_key(this.ctxPtr,_,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}generatePostQuantumPrivateKey(){k.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_key_provider_generate_post_quantum_private_key(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}generateCompoundPrivateKey(_,r){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureNumber("cipherAlgId",_),k.ensureNumber("signerAlgId",r);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_provider_generate_compound_private_key(this.ctxPtr,_,r,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}generateHybridPrivateKey(_,r){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureNumber("firstKeyAlgId",_),k.ensureNumber("secondKeyAlgId",r);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_provider_generate_hybrid_private_key(this.ctxPtr,_,r,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}generateCompoundHybridPrivateKey(_,r,s,n){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureNumber("cipherFirstKeyAlgId",_),k.ensureNumber("cipherSecondKeyAlgId",r),k.ensureNumber("signerFirstKeyAlgId",s),k.ensureNumber("signerSecondKeyAlgId",n);const c=e._vscf_error_ctx_size(),a=e._malloc(c);let i;e._vscf_error_reset(a);try{i=e._vscf_key_provider_generate_compound_hybrid_private_key(this.ctxPtr,_,r,s,n,a);const c=e._vscf_error_status(a);return t.FoundationError.handleStatusCode(c),t.FoundationInterface.newAndTakeCContext(i)}finally{e._free(a)}}importPrivateKey(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureByteArray("keyData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);let o;e._vscf_error_reset(i);try{o=e._vscf_key_provider_import_private_key(this.ctxPtr,c,i);const _=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(i)}}importPublicKey(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureByteArray("keyData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);let o;e._vscf_error_reset(i);try{o=e._vscf_key_provider_import_public_key(this.ctxPtr,c,i);const _=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(i)}}exportedPublicKeyLen(_){let r;return k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_key_provider_exported_public_key_len(this.ctxPtr,_.ctxPtr),r}exportPublicKey(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_provider_export_public_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}exportedPrivateKeyLen(_){let r;return k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_key_provider_exported_private_key_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKey(_){k.ensureNotNull("this.ctxPtr",this.ctxPtr),k.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_provider_export_private_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}}return _},_t=(e,t)=>{class _{constructor(t){this.name="Signer",this.ctxPtr=void 0===t?e._vscf_signer_new():t}static newAndUseCContext(t){return new _(e._vscf_signer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_signer_release_hash(this.ctxPtr),e._vscf_signer_use_hash(this.ctxPtr,_.ctxPtr)}set random(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_signer_release_random(this.ctxPtr),e._vscf_signer_use_random(this.ctxPtr,_.ctxPtr)}reset(){E.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_reset(this.ctxPtr)}appendData(t){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_signer_append_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}signatureLen(_){let r;return E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_signer_signature_len(this.ctxPtr,_.ctxPtr),r}sign(_){E.ensureNotNull("this.ctxPtr",this.ctxPtr),E.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.signatureLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_signer_sign(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}}return _},rt=(e,t)=>{class _{constructor(t){this.name="Verifier",this.ctxPtr=void 0===t?e._vscf_verifier_new():t}static newAndUseCContext(t){return new _(e._vscf_verifier_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_verifier_delete(this.ctxPtr),this.ctxPtr=null)}reset(_){w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.ensureByteArray("signature",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{const _=e._vscf_verifier_reset(this.ctxPtr,c);t.FoundationError.handleStatusCode(_)}finally{e._free(s),e._free(c)}}appendData(t){w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_verifier_append_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}verify(_){let r;return w.ensureNotNull("this.ctxPtr",this.ctxPtr),w.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_verifier_verify(this.ctxPtr,_.ctxPtr),!!r}}return _},st=(e,t)=>{class _{static get POINT_LEN(){return 65}get POINT_LEN(){return _.POINT_LEN}static get MPI_LEN(){return 32}get MPI_LEN(){return _.MPI_LEN}static get SEED_LEN(){return 32}get SEED_LEN(){return _.SEED_LEN}static get MAX_PASSWORD_LEN(){return 128}get MAX_PASSWORD_LEN(){return _.MAX_PASSWORD_LEN}static get MAX_KEY_NAME_LEN(){return 128}get MAX_KEY_NAME_LEN(){return _.MAX_KEY_NAME_LEN}constructor(t){this.name="BrainkeyClient",this.ctxPtr=void 0===t?e._vscf_brainkey_client_new():t}static newAndUseCContext(t){return new _(e._vscf_brainkey_client_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_brainkey_client_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){b.ensureNotNull("this.ctxPtr",this.ctxPtr),b.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_brainkey_client_release_random(this.ctxPtr),e._vscf_brainkey_client_use_random(this.ctxPtr,_.ctxPtr)}set operationRandom(_){b.ensureNotNull("this.ctxPtr",this.ctxPtr),b.ensureImplementInterface("operationRandom",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_brainkey_client_release_operation_random(this.ctxPtr),e._vscf_brainkey_client_use_operation_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){b.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_brainkey_client_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}blind(_){b.ensureNotNull("this.ctxPtr",this.ctxPtr),b.ensureByteArray("password",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=t.BrainkeyClient.MPI_LEN,i=e._vsc_buffer_new_with_capacity(a),o=t.BrainkeyClient.POINT_LEN,l=e._vsc_buffer_new_with_capacity(o);try{const _=e._vscf_brainkey_client_blind(this.ctxPtr,c,i,l);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i),n=e.HEAPU8.slice(r,r+s),a=e._vsc_buffer_bytes(l),o=e._vsc_buffer_len(l);return{deblindFactor:n,blindedPoint:e.HEAPU8.slice(a,a+o)}}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i),e._vsc_buffer_delete(l)}}deblind(_,r,s,n){b.ensureNotNull("this.ctxPtr",this.ctxPtr),b.ensureByteArray("password",_),b.ensureByteArray("hardenedPoint",r),b.ensureByteArray("deblindFactor",s),b.ensureByteArray("keyName",n);const c=_.length*_.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(_,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=r.length*r.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(r,f);const d=e._vsc_data_ctx_size(),u=e._malloc(d);e._vsc_data(u,f,l);const v=s.length*s.BYTES_PER_ELEMENT,h=e._malloc(v);e.HEAP8.set(s,h);const p=e._vsc_data_ctx_size(),y=e._malloc(p);e._vsc_data(y,h,v);const P=n.length*n.BYTES_PER_ELEMENT,m=e._malloc(P);e.HEAP8.set(n,m);const g=e._vsc_data_ctx_size(),x=e._malloc(g);e._vsc_data(x,m,P);const k=t.BrainkeyClient.POINT_LEN,E=e._vsc_buffer_new_with_capacity(k);try{const _=e._vscf_brainkey_client_deblind(this.ctxPtr,o,u,y,x,E);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(E),s=e._vsc_buffer_len(E);return e.HEAPU8.slice(r,r+s)}finally{e._free(a),e._free(o),e._free(f),e._free(u),e._free(h),e._free(y),e._free(m),e._free(x),e._vsc_buffer_delete(E)}}}return _},nt=(e,t)=>{class _{static get POINT_LEN(){return 65}get POINT_LEN(){return _.POINT_LEN}static get MPI_LEN(){return 32}get MPI_LEN(){return _.MPI_LEN}constructor(t){this.name="BrainkeyServer",this.ctxPtr=void 0===t?e._vscf_brainkey_server_new():t}static newAndUseCContext(t){return new _(e._vscf_brainkey_server_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_brainkey_server_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_brainkey_server_release_random(this.ctxPtr),e._vscf_brainkey_server_use_random(this.ctxPtr,_.ctxPtr)}set operationRandom(_){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.ensureImplementInterface("operationRandom",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_brainkey_server_release_operation_random(this.ctxPtr),e._vscf_brainkey_server_use_operation_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){N.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_brainkey_server_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateIdentitySecret(){N.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=t.BrainkeyServer.MPI_LEN,r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_brainkey_server_generate_identity_secret(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}harden(_,r){N.ensureNotNull("this.ctxPtr",this.ctxPtr),N.ensureByteArray("identitySecret",_),N.ensureByteArray("blindedPoint",r);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=r.length*r.BYTES_PER_ELEMENT,o=e._malloc(i);e.HEAP8.set(r,o);const l=e._vsc_data_ctx_size(),f=e._malloc(l);e._vsc_data(f,o,i);const d=t.BrainkeyServer.POINT_LEN,u=e._vsc_buffer_new_with_capacity(d);try{const _=e._vscf_brainkey_server_harden(this.ctxPtr,a,f,u);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(u),s=e._vsc_buffer_len(u);return e.HEAPU8.slice(r,r+s)}finally{e._free(n),e._free(a),e._free(o),e._free(f),e._vsc_buffer_delete(u)}}}return _},ct=(e,t)=>{class _{static get MAX_MESSAGE_LEN(){return 30188}get MAX_MESSAGE_LEN(){return _.MAX_MESSAGE_LEN}static get MESSAGE_VERSION(){return 1}get MESSAGE_VERSION(){return _.MESSAGE_VERSION}constructor(t){this.name="GroupSessionMessage",this.ctxPtr=void 0===t?e._vscf_group_session_message_new():t}static newAndUseCContext(t){return new _(e._vscf_group_session_message_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_message_delete(this.ctxPtr),this.ctxPtr=null)}getType(){let t;return I.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_get_type(this.ctxPtr),t}getSessionId(){I.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_group_session_message_get_session_id(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}getEpoch(){let t;return I.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_get_epoch(this.ctxPtr),t}serializeLen(){let t;return I.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_message_serialize_len(this.ctxPtr),t}serialize(){I.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.serializeLen(),_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_group_session_message_serialize(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}static deserialize(r){I.ensureByteArray("input",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_group_session_message_deserialize(a,o);const r=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(r),_.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}}return _},at=(e,t)=>{class _{constructor(t){this.name="GroupSessionTicket",this.ctxPtr=void 0===t?e._vscf_group_session_ticket_new():t}static newAndUseCContext(t){return new _(e._vscf_group_session_ticket_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_ticket_delete(this.ctxPtr),this.ctxPtr=null)}set rng(_){A.ensureNotNull("this.ctxPtr",this.ctxPtr),A.ensureImplementInterface("rng",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_group_session_ticket_release_rng(this.ctxPtr),e._vscf_group_session_ticket_use_rng(this.ctxPtr,_.ctxPtr)}setupDefaults(){A.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_group_session_ticket_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setupTicketAsNew(_){A.ensureNotNull("this.ctxPtr",this.ctxPtr),A.ensureByteArray("sessionId",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{const _=e._vscf_group_session_ticket_setup_ticket_as_new(this.ctxPtr,c);t.FoundationError.handleStatusCode(_)}finally{e._free(s),e._free(c)}}getTicketMessage(){let _;return A.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_group_session_ticket_get_ticket_message(this.ctxPtr),t.GroupSessionMessage.newAndUseCContext(_)}}return _},it=(e,t)=>{class _{static get SENDER_ID_LEN(){return 32}get SENDER_ID_LEN(){return _.SENDER_ID_LEN}static get MAX_PLAIN_TEXT_LEN(){return 3e4}get MAX_PLAIN_TEXT_LEN(){return _.MAX_PLAIN_TEXT_LEN}static get MAX_EPOCHS_COUNT(){return 50}get MAX_EPOCHS_COUNT(){return _.MAX_EPOCHS_COUNT}static get SALT_SIZE(){return 32}get SALT_SIZE(){return _.SALT_SIZE}constructor(t){this.name="GroupSession",this.ctxPtr=void 0===t?e._vscf_group_session_new():t}static newAndUseCContext(t){return new _(e._vscf_group_session_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_group_session_delete(this.ctxPtr),this.ctxPtr=null)}set rng(_){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureImplementInterface("rng",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_group_session_release_rng(this.ctxPtr),e._vscf_group_session_use_rng(this.ctxPtr,_.ctxPtr)}getCurrentEpoch(){let t;return C.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_group_session_get_current_epoch(this.ctxPtr),t}setupDefaults(){C.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_group_session_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}getSessionId(){C.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_group_session_get_session_id(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}addEpoch(_){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureClass("message",_,t.GroupSessionMessage);const r=e._vscf_group_session_add_epoch(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_,r){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureByteArray("plainText",_),C.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_group_session_encrypt(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.GroupSessionMessage.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}decryptLen(_){let r;return C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureClass("message",_,t.GroupSessionMessage),r=e._vscf_group_session_decrypt_len(this.ctxPtr,_.ctxPtr),r}decrypt(_,r){C.ensureNotNull("this.ctxPtr",this.ctxPtr),C.ensureClass("message",_,t.GroupSessionMessage),C.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const s=this.decryptLen(_),n=e._vsc_buffer_new_with_capacity(s);try{const s=e._vscf_group_session_decrypt(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);t.FoundationError.handleStatusCode(s);const c=e._vsc_buffer_bytes(n),a=e._vsc_buffer_len(n);return e.HEAPU8.slice(c,c+a)}finally{e._vsc_buffer_delete(n)}}createGroupTicket(){C.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_group_session_create_group_ticket(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.GroupSessionTicket.newAndTakeCContext(s)}finally{e._free(r)}}}return _},ot=(e,t)=>{class _{constructor(t){this.name="MessageInfoEditor",this.ctxPtr=void 0===t?e._vscf_message_info_editor_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_editor_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_editor_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){T.ensureNotNull("this.ctxPtr",this.ctxPtr),T.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_message_info_editor_release_random(this.ctxPtr),e._vscf_message_info_editor_use_random(this.ctxPtr,_.ctxPtr)}setupDefaults(){T.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_message_info_editor_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}unpack(_){T.ensureNotNull("this.ctxPtr",this.ctxPtr),T.ensureByteArray("messageInfoData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{const _=e._vscf_message_info_editor_unpack(this.ctxPtr,c);t.FoundationError.handleStatusCode(_)}finally{e._free(s),e._free(c)}}unlock(_,r){T.ensureNotNull("this.ctxPtr",this.ctxPtr),T.ensureByteArray("ownerRecipientId",_),T.ensureImplementInterface("ownerPrivateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);try{const _=e._vscf_message_info_editor_unlock(this.ctxPtr,a,r.ctxPtr);t.FoundationError.handleStatusCode(_)}finally{e._free(n),e._free(a)}}addKeyRecipient(_,r){T.ensureNotNull("this.ctxPtr",this.ctxPtr),T.ensureByteArray("recipientId",_),T.ensureImplementInterface("publicKey",r,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);try{const _=e._vscf_message_info_editor_add_key_recipient(this.ctxPtr,a,r.ctxPtr);t.FoundationError.handleStatusCode(_)}finally{e._free(n),e._free(a)}}removeKeyRecipient(t){T.ensureNotNull("this.ctxPtr",this.ctxPtr),T.ensureByteArray("recipientId",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_message_info_editor_remove_key_recipient(this.ctxPtr,n),!!c}finally{e._free(r),e._free(n)}}removeAll(){T.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_editor_remove_all(this.ctxPtr)}packedLen(){let t;return T.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_editor_packed_len(this.ctxPtr),t}pack(){T.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.packedLen(),_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_message_info_editor_pack(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},lt=(e,t)=>{class _{constructor(t){this.name="SignerInfo",this.ctxPtr=void 0===t?e._vscf_signer_info_new():t}static newAndUseCContext(t){return new _(e._vscf_signer_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_info_delete(this.ctxPtr),this.ctxPtr=null)}signerId(){F.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_signer_info_signer_id(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}signerAlgInfo(){let _;return F.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_signer_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signature(){F.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_signer_info_signature(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},ft=(e,t)=>{class _{constructor(t){this.name="SignerInfoList",this.ctxPtr=void 0===t?e._vscf_signer_info_list_new():t}static newAndUseCContext(t){return new _(e._vscf_signer_info_list_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signer_info_list_delete(this.ctxPtr),this.ctxPtr=null)}hasItem(){let t;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_item(this.ctxPtr),!!t}item(){let _;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signer_info_list_item(this.ctxPtr),t.SignerInfo.newAndUseCContext(_)}hasNext(){let t;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_next(this.ctxPtr),!!t}next(){let t;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_next(this.ctxPtr),_.newAndTakeCContext(t)}hasPrev(){let t;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_has_prev(this.ctxPtr),!!t}prev(){let t;return K.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_signer_info_list_prev(this.ctxPtr),_.newAndTakeCContext(t)}clear(){K.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_signer_info_list_clear(this.ctxPtr)}}return _},dt=(e,t)=>{class _{constructor(t){this.name="MessageInfoFooter",this.ctxPtr=void 0===t?e._vscf_message_info_footer_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_footer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_footer_delete(this.ctxPtr),this.ctxPtr=null)}hasSignerInfos(){let t;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_message_info_footer_has_signer_infos(this.ctxPtr),!!t}signerInfos(){let _;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_signer_infos(this.ctxPtr),t.SignerInfoList.newAndUseCContext(_)}signerHashAlgInfo(){let _;return S.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_message_info_footer_signer_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerDigest(){S.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_message_info_footer_signer_digest(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},ut=(e,t)=>{class _{constructor(t){this.name="SignedDataInfo",this.ctxPtr=void 0===t?e._vscf_signed_data_info_new():t}static newAndUseCContext(t){return new _(e._vscf_signed_data_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_signed_data_info_delete(this.ctxPtr),this.ctxPtr=null)}hashAlgInfo(){let _;return L.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_signed_data_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},vt=(e,t)=>{class _{constructor(t){this.name="FooterInfo",this.ctxPtr=void 0===t?e._vscf_footer_info_new():t}static newAndUseCContext(t){return new _(e._vscf_footer_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_footer_info_delete(this.ctxPtr),this.ctxPtr=null)}hasSignedDataInfo(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_footer_info_has_signed_data_info(this.ctxPtr),!!t}signedDataInfo(){let _;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_footer_info_signed_data_info(this.ctxPtr),t.SignedDataInfo.newAndUseCContext(_)}setDataSize(t){R.ensureNotNull("this.ctxPtr",this.ctxPtr),R.ensureNumber("dataSize",t),e._vscf_footer_info_set_data_size(this.ctxPtr,t)}dataSize(){let t;return R.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_footer_info_data_size(this.ctxPtr),t}}return _},ht=(e,t)=>{class _{constructor(t){this.name="KeyInfo",this.ctxPtr=void 0===t?e._vscf_key_info_new():t}static newAndUseCContext(t){return new _(e._vscf_key_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithAlgInfo(r){let s;return z.ensureImplementInterface("algInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),s=e._vscf_key_info_new_with_alg_info(r.ctxPtr),_.newAndTakeCContext(s)}isCompound(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound(this.ctxPtr),!!t}isHybrid(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid(this.ctxPtr),!!t}isCompoundHybrid(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid(this.ctxPtr),!!t}isCompoundHybridCipher(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid_cipher(this.ctxPtr),!!t}isCompoundHybridSigner(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_compound_hybrid_signer(this.ctxPtr),!!t}isHybridPostQuantum(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum(this.ctxPtr),!!t}isHybridPostQuantumCipher(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum_cipher(this.ctxPtr),!!t}isHybridPostQuantumSigner(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_is_hybrid_post_quantum_signer(this.ctxPtr),!!t}algId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_alg_id(this.ctxPtr),t}compoundCipherAlgId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_cipher_alg_id(this.ctxPtr),t}compoundSignerAlgId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_signer_alg_id(this.ctxPtr),t}hybridFirstKeyAlgId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_hybrid_first_key_alg_id(this.ctxPtr),t}hybridSecondKeyAlgId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_hybrid_second_key_alg_id(this.ctxPtr),t}compoundHybridCipherFirstKeyAlgId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_cipher_first_key_alg_id(this.ctxPtr),t}compoundHybridCipherSecondKeyAlgId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_cipher_second_key_alg_id(this.ctxPtr),t}compoundHybridSignerFirstKeyAlgId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_signer_first_key_alg_id(this.ctxPtr),t}compoundHybridSignerSecondKeyAlgId(){let t;return z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_key_info_compound_hybrid_signer_second_key_alg_id(this.ctxPtr),t}}return _},pt=(e,t)=>{class _{static get DEFAULT_FRAME_MIN(){return 32}get DEFAULT_FRAME_MIN(){return _.DEFAULT_FRAME_MIN}static get DEFAULT_FRAME(){return 160}get DEFAULT_FRAME(){return _.DEFAULT_FRAME}static get DEFAULT_FRAME_MAX(){return 256}get DEFAULT_FRAME_MAX(){return _.DEFAULT_FRAME_MAX}constructor(t){this.name="PaddingParams",this.ctxPtr=void 0===t?e._vscf_padding_params_new():t}static newAndUseCContext(t){return new _(e._vscf_padding_params_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_padding_params_delete(this.ctxPtr),this.ctxPtr=null)}static newWithConstraints(t,r){let s;return D.ensureNumber("frame",t),D.ensureNumber("frameMax",r),s=e._vscf_padding_params_new_with_constraints(t,r),_.newAndTakeCContext(s)}frame(){let t;return D.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_padding_params_frame(this.ctxPtr),t}frameMax(){let t;return D.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_padding_params_frame_max(this.ctxPtr),t}}return _},yt=(e,t)=>{class _{static get DIGEST_LEN(){return 28}get DIGEST_LEN(){return _.DIGEST_LEN}static get BLOCK_LEN(){return 64}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Sha224",this.ctxPtr=void 0===t?e._vscf_sha224_new():t}static newAndUseCContext(t){return new _(e._vscf_sha224_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha224_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return U.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha224_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return U.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha224_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){U.ensureNotNull("this.ctxPtr",this.ctxPtr),U.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_sha224_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}hash(t){U.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.DIGEST_LEN,a=e._vsc_buffer_new_with_capacity(c);try{e._vscf_sha224_hash(n,a);const t=e._vsc_buffer_bytes(a),_=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(a)}}start(){U.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha224_start(this.ctxPtr)}update(t){U.ensureNotNull("this.ctxPtr",this.ctxPtr),U.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_sha224_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){U.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_sha224_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},Pt=(e,t)=>{class _{static get DIGEST_LEN(){return 32}get DIGEST_LEN(){return _.DIGEST_LEN}static get BLOCK_LEN(){return 64}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Sha256",this.ctxPtr=void 0===t?e._vscf_sha256_new():t}static newAndUseCContext(t){return new _(e._vscf_sha256_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha256_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha256_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return M.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha256_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_sha256_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}hash(t){M.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.DIGEST_LEN,a=e._vsc_buffer_new_with_capacity(c);try{e._vscf_sha256_hash(n,a);const t=e._vsc_buffer_bytes(a),_=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(a)}}start(){M.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha256_start(this.ctxPtr)}update(t){M.ensureNotNull("this.ctxPtr",this.ctxPtr),M.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_sha256_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){M.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_sha256_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},mt=(e,t)=>{class _{static get DIGEST_LEN(){return 48}get DIGEST_LEN(){return _.DIGEST_LEN}static get BLOCK_LEN(){return 128}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Sha384",this.ctxPtr=void 0===t?e._vscf_sha384_new():t}static newAndUseCContext(t){return new _(e._vscf_sha384_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha384_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return B.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha384_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return B.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha384_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){B.ensureNotNull("this.ctxPtr",this.ctxPtr),B.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_sha384_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}hash(t){B.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.DIGEST_LEN,a=e._vsc_buffer_new_with_capacity(c);try{e._vscf_sha384_hash(n,a);const t=e._vsc_buffer_bytes(a),_=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(a)}}start(){B.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha384_start(this.ctxPtr)}update(t){B.ensureNotNull("this.ctxPtr",this.ctxPtr),B.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_sha384_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){B.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_sha384_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},gt=(e,t)=>{class _{static get DIGEST_LEN(){return 64}get DIGEST_LEN(){return _.DIGEST_LEN}static get BLOCK_LEN(){return 128}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Sha512",this.ctxPtr=void 0===t?e._vscf_sha512_new():t}static newAndUseCContext(t){return new _(e._vscf_sha512_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sha512_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_sha512_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return O.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_sha512_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){O.ensureNotNull("this.ctxPtr",this.ctxPtr),O.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_sha512_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}hash(t){O.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.DIGEST_LEN,a=e._vsc_buffer_new_with_capacity(c);try{e._vscf_sha512_hash(n,a);const t=e._vsc_buffer_bytes(a),_=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(a)}}start(){O.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sha512_start(this.ctxPtr)}update(t){O.ensureNotNull("this.ctxPtr",this.ctxPtr),O.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_sha512_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){O.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.DIGEST_LEN,_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_sha512_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}}return _},xt=(e,t)=>{class _{static get NONCE_LEN(){return 12}get NONCE_LEN(){return _.NONCE_LEN}static get KEY_LEN(){return 32}get KEY_LEN(){return _.KEY_LEN}static get KEY_BITLEN(){return 256}get KEY_BITLEN(){return _.KEY_BITLEN}static get BLOCK_LEN(){return 16}get BLOCK_LEN(){return _.BLOCK_LEN}static get AUTH_TAG_LEN(){return 16}get AUTH_TAG_LEN(){return _.AUTH_TAG_LEN}constructor(t){this.name="Aes256Gcm",this.ctxPtr=void 0===t?e._vscf_aes256_gcm_new():t}static newAndUseCContext(t){return new _(e._vscf_aes256_gcm_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_aes256_gcm_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_gcm_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_aes256_gcm_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_aes256_gcm_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.encryptedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_aes256_gcm_encrypt(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}encryptedLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.decryptedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_aes256_gcm_decrypt(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}decryptedLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_decrypted_len(this.ctxPtr,t),_}setNonce(t){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("nonce",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_gcm_set_nonce(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}setKey(t){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("key",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_gcm_set_key(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}state(){let t;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_gcm_state(this.ctxPtr),t}startEncryption(){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_gcm_start_encryption(this.ctxPtr)}startDecryption(){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_gcm_start_decryption(this.ctxPtr)}update(t){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.outLen(t.length),a=e._vsc_buffer_new_with_capacity(c);try{e._vscf_aes256_gcm_update(this.ctxPtr,n,a);const t=e._vsc_buffer_bytes(a),_=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(a)}}outLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_out_len(this.ctxPtr,t),_}encryptedOutLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_encrypted_out_len(this.ctxPtr,t),_}decryptedOutLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_decrypted_out_len(this.ctxPtr,t),_}finish(){Y.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_aes256_gcm_finish(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}authEncrypt(_,r){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("data",_),Y.ensureByteArray("authData",r);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=r.length*r.BYTES_PER_ELEMENT,o=e._malloc(i);e.HEAP8.set(r,o);const l=e._vsc_data_ctx_size(),f=e._malloc(l);e._vsc_data(f,o,i);const d=this.authEncryptedLen(_.length),u=e._vsc_buffer_new_with_capacity(d),v=this.AUTH_TAG_LEN,h=e._vsc_buffer_new_with_capacity(v);try{const _=e._vscf_aes256_gcm_auth_encrypt(this.ctxPtr,a,f,u,h);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(u),s=e._vsc_buffer_len(u),n=e.HEAPU8.slice(r,r+s),c=e._vsc_buffer_bytes(h),i=e._vsc_buffer_len(h);return{out:n,tag:e.HEAPU8.slice(c,c+i)}}finally{e._free(n),e._free(a),e._free(o),e._free(f),e._vsc_buffer_delete(u),e._vsc_buffer_delete(h)}}authEncryptedLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_auth_encrypted_len(this.ctxPtr,t),_}authDecrypt(_,r,s){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("data",_),Y.ensureByteArray("authData",r),Y.ensureByteArray("tag",s);const n=_.length*_.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(_,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);e._vsc_data(i,c,n);const o=r.length*r.BYTES_PER_ELEMENT,l=e._malloc(o);e.HEAP8.set(r,l);const f=e._vsc_data_ctx_size(),d=e._malloc(f);e._vsc_data(d,l,o);const u=s.length*s.BYTES_PER_ELEMENT,v=e._malloc(u);e.HEAP8.set(s,v);const h=e._vsc_data_ctx_size(),p=e._malloc(h);e._vsc_data(p,v,u);const y=this.authDecryptedLen(_.length),P=e._vsc_buffer_new_with_capacity(y);try{const _=e._vscf_aes256_gcm_auth_decrypt(this.ctxPtr,i,d,p,P);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(P),s=e._vsc_buffer_len(P);return e.HEAPU8.slice(r,r+s)}finally{e._free(c),e._free(i),e._free(l),e._free(d),e._free(v),e._free(p),e._vsc_buffer_delete(P)}}authDecryptedLen(t){let _;return Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureNumber("dataLen",t),_=e._vscf_aes256_gcm_auth_decrypted_len(this.ctxPtr,t),_}setAuthData(t){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("authData",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_gcm_set_auth_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finishAuthEncryption(){Y.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),r=e._vsc_buffer_new_with_capacity(_),s=this.AUTH_TAG_LEN,n=e._vsc_buffer_new_with_capacity(s);try{const _=e._vscf_aes256_gcm_finish_auth_encryption(this.ctxPtr,r,n);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),c=e._vsc_buffer_len(r),a=e.HEAPU8.slice(s,s+c),i=e._vsc_buffer_bytes(n),o=e._vsc_buffer_len(n);return{out:a,tag:e.HEAPU8.slice(i,i+o)}}finally{e._vsc_buffer_delete(r),e._vsc_buffer_delete(n)}}finishAuthDecryption(_){Y.ensureNotNull("this.ctxPtr",this.ctxPtr),Y.ensureByteArray("tag",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.outLen(0),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_aes256_gcm_finish_auth_decryption(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}}return _},kt=(e,t)=>{class _{static get NONCE_LEN(){return 16}get NONCE_LEN(){return _.NONCE_LEN}static get KEY_LEN(){return 32}get KEY_LEN(){return _.KEY_LEN}static get KEY_BITLEN(){return 256}get KEY_BITLEN(){return _.KEY_BITLEN}static get BLOCK_LEN(){return 16}get BLOCK_LEN(){return _.BLOCK_LEN}constructor(t){this.name="Aes256Cbc",this.ctxPtr=void 0===t?e._vscf_aes256_cbc_new():t}static newAndUseCContext(t){return new _(e._vscf_aes256_cbc_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_aes256_cbc_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_cbc_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_aes256_cbc_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_aes256_cbc_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.encryptedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_aes256_cbc_encrypt(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}encryptedLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.decryptedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_aes256_cbc_decrypt(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}decryptedLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_decrypted_len(this.ctxPtr,t),_}setNonce(t){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("nonce",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_cbc_set_nonce(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}setKey(t){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("key",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_aes256_cbc_set_key(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}state(){let t;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_aes256_cbc_state(this.ctxPtr),t}startEncryption(){H.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_cbc_start_encryption(this.ctxPtr)}startDecryption(){H.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_aes256_cbc_start_decryption(this.ctxPtr)}update(t){H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=this.outLen(t.length),a=e._vsc_buffer_new_with_capacity(c);try{e._vscf_aes256_cbc_update(this.ctxPtr,n,a);const t=e._vsc_buffer_bytes(a),_=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(a)}}outLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_out_len(this.ctxPtr,t),_}encryptedOutLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_encrypted_out_len(this.ctxPtr,t),_}decryptedOutLen(t){let _;return H.ensureNotNull("this.ctxPtr",this.ctxPtr),H.ensureNumber("dataLen",t),_=e._vscf_aes256_cbc_decrypted_out_len(this.ctxPtr,t),_}finish(){H.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.outLen(0),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_aes256_cbc_finish(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}}return _},Et=(e,t)=>{class _{constructor(t){this.name="Asn1rd",this.ctxPtr=void 0===t?e._vscf_asn1rd_new():t}static newAndUseCContext(t){return new _(e._vscf_asn1rd_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_asn1rd_delete(this.ctxPtr),this.ctxPtr=null)}reset(t){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_asn1rd_reset(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}leftLen(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_left_len(this.ctxPtr),t}hasError(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_has_error(this.ctxPtr),!!t}status(){G.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_asn1rd_status(this.ctxPtr);t.FoundationError.handleStatusCode(_)}getTag(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_tag(this.ctxPtr),t}getLen(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_len(this.ctxPtr),t}getDataLen(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_get_data_len(this.ctxPtr),t}readTag(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("tag",t),_=e._vscf_asn1rd_read_tag(this.ctxPtr,t),_}readContextTag(t){let _;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("tag",t),_=e._vscf_asn1rd_read_context_tag(this.ctxPtr,t),_}readInt(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int(this.ctxPtr),t}readInt8(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int8(this.ctxPtr),t}readInt16(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int16(this.ctxPtr),t}readInt32(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int32(this.ctxPtr),t}readInt64(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_int64(this.ctxPtr),t}readUint(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint(this.ctxPtr),t}readUint8(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint8(this.ctxPtr),t}readUint16(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint16(this.ctxPtr),t}readUint32(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint32(this.ctxPtr),t}readUint64(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_uint64(this.ctxPtr),t}readBool(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_bool(this.ctxPtr),!!t}readNull(){G.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_null(this.ctxPtr)}readNullOptional(){G.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_asn1rd_read_null_optional(this.ctxPtr)}readOctetStr(){G.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_asn1rd_read_octet_str(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}readBitstringAsOctetStr(){G.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_asn1rd_read_bitstring_as_octet_str(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}readUtf8Str(){G.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_asn1rd_read_utf8_str(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}readOid(){G.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_asn1rd_read_oid(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}readData(t){G.ensureNotNull("this.ctxPtr",this.ctxPtr),G.ensureNumber("len",t);const _=e._vsc_data_ctx_size(),r=e._malloc(_);try{e._vscf_asn1rd_read_data(r,this.ctxPtr,t);const _=e._vsc_data_len(r),s=e._vsc_data_bytes(r);return e.HEAPU8.slice(s,s+_)}finally{e._free(r)}}readSequence(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_sequence(this.ctxPtr),t}readSet(){let t;return G.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1rd_read_set(this.ctxPtr),t}}return _},wt=(e,t)=>{class _{constructor(t){this.name="Asn1wr",this.ctxPtr=void 0===t?e._vscf_asn1wr_new():t}static newAndUseCContext(t){return new _(e._vscf_asn1wr_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_asn1wr_delete(this.ctxPtr),this.ctxPtr=null)}reset(t,_){V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("out",t),V.ensureNumber("outLen",_),e._vscf_asn1wr_reset(this.ctxPtr,t,_)}finish(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureBoolean("doNotAdjust",t),_=e._vscf_asn1wr_finish(this.ctxPtr,t),_}bytes(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_bytes(this.ctxPtr),t}len(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_len(this.ctxPtr),t}writtenLen(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_written_len(this.ctxPtr),t}unwrittenLen(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_unwritten_len(this.ctxPtr),t}hasError(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_has_error(this.ctxPtr),!!t}status(){V.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_asn1wr_status(this.ctxPtr);t.FoundationError.handleStatusCode(_)}reserve(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("len",t),_=e._vscf_asn1wr_reserve(this.ctxPtr,t),_}writeTag(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("tag",t),_=e._vscf_asn1wr_write_tag(this.ctxPtr,t),_}writeContextTag(t,_){let r;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("tag",t),V.ensureNumber("len",_),r=e._vscf_asn1wr_write_context_tag(this.ctxPtr,t,_),r}writeLen(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("len",t),_=e._vscf_asn1wr_write_len(this.ctxPtr,t),_}writeInt(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_int(this.ctxPtr,t),_}writeInt8(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_int8(this.ctxPtr,t),_}writeInt16(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_int16(this.ctxPtr,t),_}writeInt32(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_int32(this.ctxPtr,t),_}writeInt64(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_int64(this.ctxPtr,t),_}writeUint(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint(this.ctxPtr,t),_}writeUint8(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint8(this.ctxPtr,t),_}writeUint16(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint16(this.ctxPtr,t),_}writeUint32(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint32(this.ctxPtr,t),_}writeUint64(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("value",t),_=e._vscf_asn1wr_write_uint64(this.ctxPtr,t),_}writeBool(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureBoolean("value",t),_=e._vscf_asn1wr_write_bool(this.ctxPtr,t),_}writeNull(){let t;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_asn1wr_write_null(this.ctxPtr),t}writeOctetStr(t){V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureByteArray("value",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_octet_str(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeOctetStrAsBitstring(t){V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureByteArray("value",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_octet_str_as_bitstring(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeData(t){V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_data(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeUtf8Str(t){V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureByteArray("value",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_utf8_str(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeOid(t){V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureByteArray("value",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_asn1wr_write_oid(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}writeSequence(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("len",t),_=e._vscf_asn1wr_write_sequence(this.ctxPtr,t),_}writeSet(t){let _;return V.ensureNotNull("this.ctxPtr",this.ctxPtr),V.ensureNumber("len",t),_=e._vscf_asn1wr_write_set(this.ctxPtr,t),_}}return _},bt=(e,t)=>{class _{constructor(t){this.name="RsaPublicKey",this.ctxPtr=void 0===t?e._vscf_rsa_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_rsa_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_len(this.ctxPtr),t}bitlen(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_is_valid(this.ctxPtr),!!t}keyExponent(){let t;return W.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_public_key_key_exponent(this.ctxPtr),t}}return _},Nt=(e,t)=>{class _{constructor(t){this.name="RsaPrivateKey",this.ctxPtr=void 0===t?e._vscf_rsa_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_rsa_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_len(this.ctxPtr),t}bitlen(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_rsa_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return X.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_rsa_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}}return _},It=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Rsa",this.ctxPtr=void 0===t?e._vscf_rsa_new():t}static newAndUseCContext(t){return new _(e._vscf_rsa_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_rsa_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_rsa_release_random(this.ctxPtr),e._vscf_rsa_use_random(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureByteArray("keyData",_),j.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_rsa_import_public_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPublicKey(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_rsa_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_rsa_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureByteArray("keyData",_),j.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_rsa_import_private_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPrivateKey(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_rsa_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),j.ensureNumber("dataLen",r),s=e._vscf_rsa_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),j.ensureNumber("dataLen",r),s=e._vscf_rsa_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),j.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_rsa_encrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),j.ensureNumber("dataLen",r),s=e._vscf_rsa_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),j.ensureNumber("dataLen",r),s=e._vscf_rsa_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),j.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_rsa_decrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canSign(_){let r;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_rsa_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),j.ensureNumber("hashId",r),j.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);e._vsc_data(i,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_rsa_sign_hash(this.ctxPtr,_.ctxPtr,r,i,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(i),e._vsc_buffer_delete(l)}}canVerify(_){let r;return j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_rsa_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),j.ensureNumber("hashId",r),j.ensureByteArray("digest",s),j.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(s,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),u=e._malloc(d);let v;e._vsc_data(u,f,l);try{return v=e._vscf_rsa_verify_hash(this.ctxPtr,_.ctxPtr,r,o,u),!!v}finally{e._free(a),e._free(o),e._free(f),e._free(u)}}setupDefaults(){j.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_rsa_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){j.ensureNotNull("this.ctxPtr",this.ctxPtr),j.ensureNumber("bitlen",_);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_rsa_generate_key(this.ctxPtr,_,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _},At=(e,t)=>{class _{constructor(t){this.name="EccPublicKey",this.ctxPtr=void 0===t?e._vscf_ecc_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_ecc_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_len(this.ctxPtr),t}bitlen(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return q.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_public_key_is_valid(this.ctxPtr),!!t}}return _},Ct=(e,t)=>{class _{constructor(t){this.name="EccPrivateKey",this.ctxPtr=void 0===t?e._vscf_ecc_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_ecc_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_len(this.ctxPtr),t}bitlen(){let t;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return Z.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_ecc_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}}return _},Tt=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Ecc",this.ctxPtr=void 0===t?e._vscf_ecc_new():t}static newAndUseCContext(t){return new _(e._vscf_ecc_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_ecc_release_random(this.ctxPtr),e._vscf_ecc_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureClass("ecies",_,t.Ecies),e._vscf_ecc_release_ecies(this.ctxPtr),e._vscf_ecc_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureByteArray("keyData",_),$.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_ecc_import_public_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPublicKey(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ecc_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureByteArray("keyData",_),$.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_ecc_import_private_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPrivateKey(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ecc_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),$.ensureNumber("dataLen",r),s=e._vscf_ecc_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),$.ensureNumber("dataLen",r),s=e._vscf_ecc_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),$.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_ecc_encrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),$.ensureNumber("dataLen",r),s=e._vscf_ecc_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),$.ensureNumber("dataLen",r),s=e._vscf_ecc_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),$.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_ecc_decrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canSign(_){let r;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ecc_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),$.ensureNumber("hashId",r),$.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);e._vsc_data(i,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_ecc_sign_hash(this.ctxPtr,_.ctxPtr,r,i,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(i),e._vsc_buffer_delete(l)}}canVerify(_){let r;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),$.ensureNumber("hashId",r),$.ensureByteArray("digest",s),$.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(s,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),u=e._malloc(d);let v;e._vsc_data(u,f,l);try{return v=e._vscf_ecc_verify_hash(this.ctxPtr,_.ctxPtr,r,o,u),!!v}finally{e._free(a),e._free(o),e._free(f),e._free(u)}}computeSharedKey(_,r){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),$.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=this.sharedKeyLen(r),n=e._vsc_buffer_new_with_capacity(s);try{const s=e._vscf_ecc_compute_shared_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);t.FoundationError.handleStatusCode(s);const c=e._vsc_buffer_bytes(n),a=e._vsc_buffer_len(n);return e.HEAPU8.slice(c,c+a)}finally{e._vsc_buffer_delete(n)}}sharedKeyLen(_){let r;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ecc_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ecc_kem_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulatedKeyLen(_){let r;return $.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ecc_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.kemSharedKeyLen(_),s=e._vsc_buffer_new_with_capacity(r),n=this.kemEncapsulatedKeyLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const r=e._vscf_ecc_kem_encapsulate(this.ctxPtr,_.ctxPtr,s,c);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),a=e._vsc_buffer_len(s),i=e.HEAPU8.slice(n,n+a),o=e._vsc_buffer_bytes(c),l=e._vsc_buffer_len(c);return{sharedKey:i,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}kemDecapsulate(_,r){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureByteArray("encapsulatedKey",_),$.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.kemSharedKeyLen(r),o=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_ecc_kem_decapsulate(this.ctxPtr,a,r.ctxPtr,o);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}setupDefaults(){$.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ecc_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){$.ensureNotNull("this.ctxPtr",this.ctxPtr),$.ensureNumber("algId",_);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ecc_generate_key(this.ctxPtr,_,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _},Ft=(e,t)=>{class _{static get SOURCES_MAX(){return 15}get SOURCES_MAX(){return _.SOURCES_MAX}constructor(t){this.name="EntropyAccumulator",this.ctxPtr=void 0===t?e._vscf_entropy_accumulator_new():t}static newAndUseCContext(t){return new _(e._vscf_entropy_accumulator_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_entropy_accumulator_delete(this.ctxPtr),this.ctxPtr=null)}isStrong(){let t;return J.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_entropy_accumulator_is_strong(this.ctxPtr),!!t}gather(_){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.ensureNumber("len",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_entropy_accumulator_gather(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){J.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_entropy_accumulator_setup_defaults(this.ctxPtr)}addSource(_,r){J.ensureNotNull("this.ctxPtr",this.ctxPtr),J.ensureImplementInterface("source",_,"Foundation.EntropySource",t.FoundationInterfaceTag.ENTROPY_SOURCE,t.FoundationInterface),J.ensureNumber("threshold",r),e._vscf_entropy_accumulator_add_source(this.ctxPtr,_.ctxPtr,r)}}return _},Kt=(e,t)=>{class _{static get RESEED_INTERVAL(){return 1e4}get RESEED_INTERVAL(){return _.RESEED_INTERVAL}static get ENTROPY_LEN(){return 48}get ENTROPY_LEN(){return _.ENTROPY_LEN}constructor(t){this.name="CtrDrbg",this.ctxPtr=void 0===t?e._vscf_ctr_drbg_new():t}static newAndUseCContext(t){return new _(e._vscf_ctr_drbg_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ctr_drbg_delete(this.ctxPtr),this.ctxPtr=null)}set entropySource(_){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureImplementInterface("entropySource",_,"Foundation.EntropySource",t.FoundationInterfaceTag.ENTROPY_SOURCE,t.FoundationInterface),e._vscf_ctr_drbg_release_entropy_source(this.ctxPtr);const r=e._vscf_ctr_drbg_use_entropy_source(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}random(_){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureNumber("dataLen",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ctr_drbg_random(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}reseed(){Q.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ctr_drbg_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}setupDefaults(){Q.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ctr_drbg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}enablePredictionResistance(){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_ctr_drbg_enable_prediction_resistance(this.ctxPtr)}setReseedInterval(t){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureNumber("interval",t),e._vscf_ctr_drbg_set_reseed_interval(this.ctxPtr,t)}setEntropyLen(t){Q.ensureNotNull("this.ctxPtr",this.ctxPtr),Q.ensureNumber("len",t),e._vscf_ctr_drbg_set_entropy_len(this.ctxPtr,t)}}return _},St=(e,t)=>{class _{constructor(t){this.name="Hmac",this.ctxPtr=void 0===t?e._vscf_hmac_new():t}static newAndUseCContext(t){return new _(e._vscf_hmac_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hmac_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_hmac_release_hash(this.ctxPtr),e._vscf_hmac_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let t;return ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hmac_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hmac_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_hmac_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}digestLen(){let t;return ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hmac_digest_len(this.ctxPtr),t}mac(t,_){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureByteArray("key",t),ee.ensureByteArray("data",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=_.length*_.BYTES_PER_ELEMENT,i=e._malloc(a);e.HEAP8.set(_,i);const o=e._vsc_data_ctx_size(),l=e._malloc(o);e._vsc_data(l,i,a);const f=this.digestLen(),d=e._vsc_buffer_new_with_capacity(f);try{e._vscf_hmac_mac(this.ctxPtr,c,l,d);const t=e._vsc_buffer_bytes(d),_=e._vsc_buffer_len(d);return e.HEAPU8.slice(t,t+_)}finally{e._free(s),e._free(c),e._free(i),e._free(l),e._vsc_buffer_delete(d)}}start(t){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureByteArray("key",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_hmac_start(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}update(t){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),ee.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_hmac_update(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}finish(){ee.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=this.digestLen(),_=e._vsc_buffer_new_with_capacity(t);try{e._vscf_hmac_finish(this.ctxPtr,_);const t=e._vsc_buffer_bytes(_),r=e._vsc_buffer_len(_);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(_)}}reset(){ee.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_hmac_reset(this.ctxPtr)}}return _},Lt=(e,t)=>{class _{constructor(t){this.name="Hkdf",this.ctxPtr=void 0===t?e._vscf_hkdf_new():t}static newAndUseCContext(t){return new _(e._vscf_hkdf_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hkdf_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_hkdf_release_hash(this.ctxPtr),e._vscf_hkdf_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let t;return te.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hkdf_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return te.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hkdf_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_hkdf_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureByteArray("data",t),te.ensureNumber("keyLen",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=_,i=e._vsc_buffer_new_with_capacity(a);try{e._vscf_hkdf_derive(this.ctxPtr,c,_,i);const t=e._vsc_buffer_bytes(i),r=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+r)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}reset(t,_){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureByteArray("salt",t),te.ensureNumber("iterationCount",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{e._vscf_hkdf_reset(this.ctxPtr,c,_)}finally{e._free(s),e._free(c)}}setInfo(t){te.ensureNotNull("this.ctxPtr",this.ctxPtr),te.ensureByteArray("info",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_hkdf_set_info(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Rt=(e,t)=>{class _{constructor(t){this.name="Kdf1",this.ctxPtr=void 0===t?e._vscf_kdf1_new():t}static newAndUseCContext(t){return new _(e._vscf_kdf1_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_kdf1_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_kdf1_release_hash(this.ctxPtr),e._vscf_kdf1_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let t;return _e.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_kdf1_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return _e.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_kdf1_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_kdf1_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){_e.ensureNotNull("this.ctxPtr",this.ctxPtr),_e.ensureByteArray("data",t),_e.ensureNumber("keyLen",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=_,i=e._vsc_buffer_new_with_capacity(a);try{e._vscf_kdf1_derive(this.ctxPtr,c,_,i);const t=e._vsc_buffer_bytes(i),r=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+r)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}}return _},zt=(e,t)=>{class _{constructor(t){this.name="Kdf2",this.ctxPtr=void 0===t?e._vscf_kdf2_new():t}static newAndUseCContext(t){return new _(e._vscf_kdf2_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_kdf2_delete(this.ctxPtr),this.ctxPtr=null)}set hash(_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_kdf2_release_hash(this.ctxPtr),e._vscf_kdf2_use_hash(this.ctxPtr,_.ctxPtr)}algId(){let t;return re.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_kdf2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return re.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_kdf2_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_kdf2_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){re.ensureNotNull("this.ctxPtr",this.ctxPtr),re.ensureByteArray("data",t),re.ensureNumber("keyLen",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=_,i=e._vsc_buffer_new_with_capacity(a);try{e._vscf_kdf2_derive(this.ctxPtr,c,_,i);const t=e._vsc_buffer_bytes(i),r=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+r)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}}return _},Dt=(e,t)=>{class _{constructor(t){this.name="FakeRandom",this.ctxPtr=void 0===t?e._vscf_fake_random_new():t}static newAndUseCContext(t){return new _(e._vscf_fake_random_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_fake_random_delete(this.ctxPtr),this.ctxPtr=null)}random(_){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureNumber("dataLen",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_fake_random_random(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}reseed(){se.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_fake_random_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}isStrong(){let t;return se.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_fake_random_is_strong(this.ctxPtr),!!t}gather(_){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureNumber("len",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_fake_random_gather(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupSourceByte(t){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureNumber("byteSource",t),e._vscf_fake_random_setup_source_byte(this.ctxPtr,t)}setupSourceData(t){se.ensureNotNull("this.ctxPtr",this.ctxPtr),se.ensureByteArray("dataSource",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_fake_random_setup_source_data(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Ut=(e,t)=>{class _{constructor(t){this.name="Pkcs5Pbkdf2",this.ctxPtr=void 0===t?e._vscf_pkcs5_pbkdf2_new():t}static newAndUseCContext(t){return new _(e._vscf_pkcs5_pbkdf2_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs5_pbkdf2_delete(this.ctxPtr),this.ctxPtr=null)}set hmac(_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureImplementInterface("hmac",_,"Foundation.Mac",t.FoundationInterfaceTag.MAC,t.FoundationInterface),e._vscf_pkcs5_pbkdf2_release_hmac(this.ctxPtr),e._vscf_pkcs5_pbkdf2_use_hmac(this.ctxPtr,_.ctxPtr)}algId(){let t;return ne.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pkcs5_pbkdf2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ne.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pkcs5_pbkdf2_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_pkcs5_pbkdf2_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}derive(t,_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureByteArray("data",t),ne.ensureNumber("keyLen",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=_,i=e._vsc_buffer_new_with_capacity(a);try{e._vscf_pkcs5_pbkdf2_derive(this.ctxPtr,c,_,i);const t=e._vsc_buffer_bytes(i),r=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+r)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}reset(t,_){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureByteArray("salt",t),ne.ensureNumber("iterationCount",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);try{e._vscf_pkcs5_pbkdf2_reset(this.ctxPtr,c,_)}finally{e._free(s),e._free(c)}}setInfo(t){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),ne.ensureByteArray("info",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_pkcs5_pbkdf2_set_info(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}setupDefaults(){ne.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_pkcs5_pbkdf2_setup_defaults(this.ctxPtr)}}return _},Mt=(e,t)=>{class _{constructor(t){this.name="Pkcs5Pbes2",this.ctxPtr=void 0===t?e._vscf_pkcs5_pbes2_new():t}static newAndUseCContext(t){return new _(e._vscf_pkcs5_pbes2_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs5_pbes2_delete(this.ctxPtr),this.ctxPtr=null)}set kdf(_){ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureImplementInterface("kdf",_,"Foundation.SaltedKdf",t.FoundationInterfaceTag.SALTED_KDF,t.FoundationInterface),e._vscf_pkcs5_pbes2_release_kdf(this.ctxPtr),e._vscf_pkcs5_pbes2_use_kdf(this.ctxPtr,_.ctxPtr)}set cipher(_){ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureImplementInterface("cipher",_,"Foundation.Cipher",t.FoundationInterfaceTag.CIPHER,t.FoundationInterface),e._vscf_pkcs5_pbes2_release_cipher(this.ctxPtr),e._vscf_pkcs5_pbes2_use_cipher(this.ctxPtr,_.ctxPtr)}algId(){let t;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pkcs5_pbes2_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pkcs5_pbes2_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_pkcs5_pbes2_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}encrypt(_){ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.encryptedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_pkcs5_pbes2_encrypt(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}encryptedLen(t){let _;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_encrypted_len(this.ctxPtr,t),_}preciseEncryptedLen(t){let _;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_precise_encrypted_len(this.ctxPtr,t),_}decrypt(_){ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=this.decryptedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_pkcs5_pbes2_decrypt(this.ctxPtr,c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}decryptedLen(t){let _;return ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureNumber("dataLen",t),_=e._vscf_pkcs5_pbes2_decrypted_len(this.ctxPtr,t),_}reset(t){ce.ensureNotNull("this.ctxPtr",this.ctxPtr),ce.ensureByteArray("pwd",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_pkcs5_pbes2_reset(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Bt=(e,t)=>{class _{constructor(t){this.name="SeedEntropySource",this.ctxPtr=void 0===t?e._vscf_seed_entropy_source_new():t}static newAndUseCContext(t){return new _(e._vscf_seed_entropy_source_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_seed_entropy_source_delete(this.ctxPtr),this.ctxPtr=null)}isStrong(){let t;return ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_seed_entropy_source_is_strong(this.ctxPtr),!!t}gather(_){ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.ensureNumber("len",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_seed_entropy_source_gather(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}resetSeed(t){ae.ensureNotNull("this.ctxPtr",this.ctxPtr),ae.ensureByteArray("seed",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_seed_entropy_source_reset_seed(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Ot=(e,t)=>{class _{static get KEY_MATERIAL_LEN_MIN(){return 32}get KEY_MATERIAL_LEN_MIN(){return _.KEY_MATERIAL_LEN_MIN}static get KEY_MATERIAL_LEN_MAX(){return 512}get KEY_MATERIAL_LEN_MAX(){return _.KEY_MATERIAL_LEN_MAX}constructor(t){this.name="KeyMaterialRng",this.ctxPtr=void 0===t?e._vscf_key_material_rng_new():t}static newAndUseCContext(t){return new _(e._vscf_key_material_rng_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_material_rng_delete(this.ctxPtr),this.ctxPtr=null)}random(_){ie.ensureNotNull("this.ctxPtr",this.ctxPtr),ie.ensureNumber("dataLen",_);const r=_,s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_material_rng_random(this.ctxPtr,_,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}reseed(){ie.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_key_material_rng_reseed(this.ctxPtr);t.FoundationError.handleStatusCode(_)}resetKeyMaterial(t){ie.ensureNotNull("this.ctxPtr",this.ctxPtr),ie.ensureByteArray("keyMaterial",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);try{e._vscf_key_material_rng_reset_key_material(this.ctxPtr,n)}finally{e._free(r),e._free(n)}}}return _},Yt=(e,t)=>{class _{constructor(t){this.name="RawPublicKey",this.ctxPtr=void 0===t?e._vscf_raw_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_raw_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_raw_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_len(this.ctxPtr),t}bitlen(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return oe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_public_key_is_valid(this.ctxPtr),!!t}data(){oe.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_raw_public_key_data(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},Ht=(e,t)=>{class _{constructor(t){this.name="RawPrivateKey",this.ctxPtr=void 0===t?e._vscf_raw_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_raw_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_raw_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_len(this.ctxPtr),t}bitlen(){let t;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}data(){le.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_raw_private_key_data(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}hasPublicKey(){let t;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_raw_private_key_has_public_key(this.ctxPtr),!!t}setPublicKey(_){le.ensureNotNull("this.ctxPtr",this.ctxPtr),le.ensureClass("rawPublicKey",_,t.RawPublicKey),e._vscf_raw_private_key_set_public_key(this.ctxPtr,_.ctxPtr)}getPublicKey(){let _;return le.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_raw_private_key_get_public_key(this.ctxPtr),t.RawPublicKey.newAndUseCContext(_)}}return _},Gt=(e,t)=>{class _{constructor(t){this.name="Pkcs8Serializer",this.ctxPtr=void 0===t?e._vscf_pkcs8_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_pkcs8_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pkcs8_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_pkcs8_serializer_release_asn1_writer(this.ctxPtr),e._vscf_pkcs8_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let r;return fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_pkcs8_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),r}serializePublicKey(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("publicKey",_,t.RawPublicKey);const r=this.serializedPublicKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_pkcs8_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}serializedPrivateKeyLen(_){let r;return fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_pkcs8_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),r}serializePrivateKey(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("privateKey",_,t.RawPrivateKey);const r=this.serializedPrivateKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_pkcs8_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_pkcs8_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("publicKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_pkcs8_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}serializePrivateKeyInplace(_){fe.ensureNotNull("this.ctxPtr",this.ctxPtr),fe.ensureClass("privateKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_pkcs8_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}}return _},Vt=(e,t)=>{class _{constructor(t){this.name="Sec1Serializer",this.ctxPtr=void 0===t?e._vscf_sec1_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_sec1_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_sec1_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_sec1_serializer_release_asn1_writer(this.ctxPtr),e._vscf_sec1_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let r;return de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_sec1_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),r}serializePublicKey(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureClass("publicKey",_,t.RawPublicKey);const r=this.serializedPublicKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_sec1_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}serializedPrivateKeyLen(_){let r;return de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_sec1_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),r}serializePrivateKey(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureClass("privateKey",_,t.RawPrivateKey);const r=this.serializedPrivateKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_sec1_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){de.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_sec1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureClass("publicKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_sec1_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}serializePrivateKeyInplace(_){de.ensureNotNull("this.ctxPtr",this.ctxPtr),de.ensureClass("privateKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_sec1_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}}return _},Wt=(e,t)=>{class _{constructor(t){this.name="KeyAsn1Serializer",this.ctxPtr=void 0===t?e._vscf_key_asn1_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_key_asn1_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_asn1_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_key_asn1_serializer_release_asn1_writer(this.ctxPtr),e._vscf_key_asn1_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedPublicKeyLen(_){let r;return ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("publicKey",_,t.RawPublicKey),r=e._vscf_key_asn1_serializer_serialized_public_key_len(this.ctxPtr,_.ctxPtr),r}serializePublicKey(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("publicKey",_,t.RawPublicKey);const r=this.serializedPublicKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_asn1_serializer_serialize_public_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}serializedPrivateKeyLen(_){let r;return ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("privateKey",_,t.RawPrivateKey),r=e._vscf_key_asn1_serializer_serialized_private_key_len(this.ctxPtr,_.ctxPtr),r}serializePrivateKey(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("privateKey",_,t.RawPrivateKey);const r=this.serializedPrivateKeyLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_key_asn1_serializer_serialize_private_key(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_asn1_serializer_setup_defaults(this.ctxPtr)}serializePublicKeyInplace(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("publicKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_key_asn1_serializer_serialize_public_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}serializePrivateKeyInplace(_){ue.ensureNotNull("this.ctxPtr",this.ctxPtr),ue.ensureClass("privateKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_key_asn1_serializer_serialize_private_key_inplace(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),n}finally{e._free(s)}}}return _},Xt=(e,t)=>{class _{constructor(t){this.name="KeyAsn1Deserializer",this.ctxPtr=void 0===t?e._vscf_key_asn1_deserializer_new():t}static newAndUseCContext(t){return new _(e._vscf_key_asn1_deserializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_key_asn1_deserializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",t.FoundationInterfaceTag.ASN1_READER,t.FoundationInterface),e._vscf_key_asn1_deserializer_release_asn1_reader(this.ctxPtr),e._vscf_key_asn1_deserializer_use_asn1_reader(this.ctxPtr,_.ctxPtr)}deserializePublicKey(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureByteArray("publicKeyData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);let o;e._vscf_error_reset(i);try{o=e._vscf_key_asn1_deserializer_deserialize_public_key(this.ctxPtr,c,i);const _=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(_),t.RawPublicKey.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(i)}}deserializePrivateKey(_){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),ve.ensureByteArray("privateKeyData",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);let o;e._vscf_error_reset(i);try{o=e._vscf_key_asn1_deserializer_deserialize_private_key(this.ctxPtr,c,i);const _=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(_),t.RawPrivateKey.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(i)}}setupDefaults(){ve.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_key_asn1_deserializer_setup_defaults(this.ctxPtr)}deserializePublicKeyInplace(){ve.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_key_asn1_deserializer_deserialize_public_key_inplace(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.RawPublicKey.newAndTakeCContext(s)}finally{e._free(r)}}deserializePrivateKeyInplace(){ve.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_key_asn1_deserializer_deserialize_private_key_inplace(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.RawPrivateKey.newAndTakeCContext(s)}finally{e._free(r)}}}return _},jt=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Ed25519",this.ctxPtr=void 0===t?e._vscf_ed25519_new():t}static newAndUseCContext(t){return new _(e._vscf_ed25519_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ed25519_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_ed25519_release_random(this.ctxPtr),e._vscf_ed25519_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureClass("ecies",_,t.Ecies),e._vscf_ed25519_release_ecies(this.ctxPtr),e._vscf_ed25519_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureByteArray("keyData",_),he.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_ed25519_import_public_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPublicKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ed25519_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureByteArray("keyData",_),he.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_ed25519_import_private_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPrivateKey(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_ed25519_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_ed25519_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureNumber("dataLen",r),s=e._vscf_ed25519_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureNumber("dataLen",r),s=e._vscf_ed25519_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_ed25519_encrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),he.ensureNumber("dataLen",r),s=e._vscf_ed25519_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),he.ensureNumber("dataLen",r),s=e._vscf_ed25519_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),he.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_ed25519_decrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canSign(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_ed25519_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),he.ensureNumber("hashId",r),he.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);e._vsc_data(i,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_ed25519_sign_hash(this.ctxPtr,_.ctxPtr,r,i,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(i),e._vsc_buffer_delete(l)}}canVerify(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureNumber("hashId",r),he.ensureByteArray("digest",s),he.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(s,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),u=e._malloc(d);let v;e._vsc_data(u,f,l);try{return v=e._vscf_ed25519_verify_hash(this.ctxPtr,_.ctxPtr,r,o,u),!!v}finally{e._free(a),e._free(o),e._free(f),e._free(u)}}computeSharedKey(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),he.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=this.sharedKeyLen(r),n=e._vsc_buffer_new_with_capacity(s);try{const s=e._vscf_ed25519_compute_shared_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);t.FoundationError.handleStatusCode(s);const c=e._vsc_buffer_bytes(n),a=e._vsc_buffer_len(n);return e.HEAPU8.slice(c,c+a)}finally{e._vsc_buffer_delete(n)}}sharedKeyLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ed25519_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_ed25519_kem_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulatedKeyLen(_){let r;return he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_ed25519_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.kemSharedKeyLen(_),s=e._vsc_buffer_new_with_capacity(r),n=this.kemEncapsulatedKeyLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const r=e._vscf_ed25519_kem_encapsulate(this.ctxPtr,_.ctxPtr,s,c);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),a=e._vsc_buffer_len(s),i=e.HEAPU8.slice(n,n+a),o=e._vsc_buffer_bytes(c),l=e._vsc_buffer_len(c);return{sharedKey:i,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}kemDecapsulate(_,r){he.ensureNotNull("this.ctxPtr",this.ctxPtr),he.ensureByteArray("encapsulatedKey",_),he.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.kemSharedKeyLen(r),o=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_ed25519_kem_decapsulate(this.ctxPtr,a,r.ctxPtr,o);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}setupDefaults(){he.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_ed25519_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(){he.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_ed25519_generate_key(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}}return _},qt=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Curve25519",this.ctxPtr=void 0===t?e._vscf_curve25519_new():t}static newAndUseCContext(t){return new _(e._vscf_curve25519_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_curve25519_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_curve25519_release_random(this.ctxPtr),e._vscf_curve25519_use_random(this.ctxPtr,_.ctxPtr)}set ecies(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureClass("ecies",_,t.Ecies),e._vscf_curve25519_release_ecies(this.ctxPtr),e._vscf_curve25519_use_ecies(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureByteArray("keyData",_),pe.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_curve25519_import_public_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPublicKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_curve25519_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_curve25519_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureByteArray("keyData",_),pe.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_curve25519_import_private_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPrivateKey(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_curve25519_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_curve25519_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_curve25519_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),pe.ensureNumber("dataLen",r),s=e._vscf_curve25519_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),pe.ensureNumber("dataLen",r),s=e._vscf_curve25519_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),pe.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_curve25519_encrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),pe.ensureNumber("dataLen",r),s=e._vscf_curve25519_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),pe.ensureNumber("dataLen",r),s=e._vscf_curve25519_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),pe.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_curve25519_decrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}computeSharedKey(_,r){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),pe.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=this.sharedKeyLen(r),n=e._vsc_buffer_new_with_capacity(s);try{const s=e._vscf_curve25519_compute_shared_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);t.FoundationError.handleStatusCode(s);const c=e._vsc_buffer_bytes(n),a=e._vsc_buffer_len(n);return e.HEAPU8.slice(c,c+a)}finally{e._vsc_buffer_delete(n)}}sharedKeyLen(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_curve25519_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemSharedKeyLen(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_curve25519_kem_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulatedKeyLen(_){let r;return pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_curve25519_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.kemSharedKeyLen(_),s=e._vsc_buffer_new_with_capacity(r),n=this.kemEncapsulatedKeyLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const r=e._vscf_curve25519_kem_encapsulate(this.ctxPtr,_.ctxPtr,s,c);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),a=e._vsc_buffer_len(s),i=e.HEAPU8.slice(n,n+a),o=e._vsc_buffer_bytes(c),l=e._vsc_buffer_len(c);return{sharedKey:i,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}kemDecapsulate(_,r){pe.ensureNotNull("this.ctxPtr",this.ctxPtr),pe.ensureByteArray("encapsulatedKey",_),pe.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.kemSharedKeyLen(r),o=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_curve25519_kem_decapsulate(this.ctxPtr,a,r.ctxPtr,o);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}setupDefaults(){pe.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_curve25519_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(){pe.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_curve25519_generate_key(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}}return _},Zt=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Falcon",this.ctxPtr=void 0===t?e._vscf_falcon_new():t}static newAndUseCContext(t){return new _(e._vscf_falcon_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_falcon_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_falcon_release_random(this.ctxPtr),e._vscf_falcon_use_random(this.ctxPtr,_.ctxPtr)}algId(){let t;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_falcon_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_falcon_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_falcon_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}generateEphemeralKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureByteArray("keyData",_),ye.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_falcon_import_public_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPublicKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_falcon_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_falcon_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureByteArray("keyData",_),ye.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_falcon_import_private_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPrivateKey(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_falcon_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_falcon_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_falcon_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canSign(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_falcon_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_falcon_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ye.ensureNumber("hashId",r),ye.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);e._vsc_data(i,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_falcon_sign_hash(this.ctxPtr,_.ctxPtr,r,i,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(i),e._vsc_buffer_delete(l)}}canVerify(_){let r;return ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_falcon_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){ye.ensureNotNull("this.ctxPtr",this.ctxPtr),ye.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ye.ensureNumber("hashId",r),ye.ensureByteArray("digest",s),ye.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(s,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),u=e._malloc(d);let v;e._vsc_data(u,f,l);try{return v=e._vscf_falcon_verify_hash(this.ctxPtr,_.ctxPtr,r,o,u),!!v}finally{e._free(a),e._free(o),e._free(f),e._free(u)}}setupDefaults(){ye.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_falcon_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(){ye.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_falcon_generate_key(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}}return _},$t=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="Round5",this.ctxPtr=void 0===t?e._vscf_round5_new():t}static newAndUseCContext(t){return new _(e._vscf_round5_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_round5_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_round5_release_random(this.ctxPtr),e._vscf_round5_use_random(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureByteArray("keyData",_),Pe.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_round5_import_public_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPublicKey(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_round5_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_round5_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureByteArray("keyData",_),Pe.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_round5_import_private_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPrivateKey(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_round5_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_round5_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}kemSharedKeyLen(_){let r;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),r=e._vscf_round5_kem_shared_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulatedKeyLen(_){let r;return Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_round5_kem_encapsulated_key_len(this.ctxPtr,_.ctxPtr),r}kemEncapsulate(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.kemSharedKeyLen(_),s=e._vsc_buffer_new_with_capacity(r),n=this.kemEncapsulatedKeyLen(_),c=e._vsc_buffer_new_with_capacity(n);try{const r=e._vscf_round5_kem_encapsulate(this.ctxPtr,_.ctxPtr,s,c);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),a=e._vsc_buffer_len(s),i=e.HEAPU8.slice(n,n+a),o=e._vsc_buffer_bytes(c),l=e._vsc_buffer_len(c);return{sharedKey:i,encapsulatedKey:e.HEAPU8.slice(o,o+l)}}finally{e._vsc_buffer_delete(s),e._vsc_buffer_delete(c)}}kemDecapsulate(_,r){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureByteArray("encapsulatedKey",_),Pe.ensureImplementInterface("privateKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.kemSharedKeyLen(r),o=e._vsc_buffer_new_with_capacity(i);try{const _=e._vscf_round5_kem_decapsulate(this.ctxPtr,a,r.ctxPtr,o);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}setupDefaults(){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_round5_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}generateKey(_){Pe.ensureNotNull("this.ctxPtr",this.ctxPtr),Pe.ensureNumber("algId",_);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_round5_generate_key(this.ctxPtr,_,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}}return _},Jt=(e,t)=>{class _{constructor(t){this.name="CompoundKeyAlgInfo",this.ctxPtr=void 0===t?e._vscf_compound_key_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_compound_key_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_key_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_key_alg_info_alg_id(this.ctxPtr),t}cipherAlgInfo(){let _;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_info_cipher_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerAlgInfo(){let _;return me.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_info_signer_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},Qt=(e,t)=>{class _{constructor(t){this.name="CompoundPublicKey",this.ctxPtr=void 0===t?e._vscf_compound_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_compound_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_len(this.ctxPtr),t}bitlen(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_public_key_is_valid(this.ctxPtr),!!t}cipherKey(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_cipher_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerKey(){let _;return ge.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_public_key_signer_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},e_=(e,t)=>{class _{constructor(t){this.name="CompoundPrivateKey",this.ctxPtr=void 0===t?e._vscf_compound_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_compound_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_len(this.ctxPtr),t}bitlen(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}cipherKey(){let _;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_cipher_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}signerKey(){let _;return xe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_private_key_signer_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},t_=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="CompoundKeyAlg",this.ctxPtr=void 0===t?e._vscf_compound_key_alg_new():t}static newAndUseCContext(t){return new _(e._vscf_compound_key_alg_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_compound_key_alg_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_compound_key_alg_release_random(this.ctxPtr),e._vscf_compound_key_alg_use_random(this.ctxPtr,_.ctxPtr)}algId(){let t;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_compound_key_alg_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_compound_key_alg_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_compound_key_alg_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}generateEphemeralKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureByteArray("keyData",_),ke.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_compound_key_alg_import_public_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPublicKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_compound_key_alg_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureByteArray("keyData",_),ke.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_compound_key_alg_import_private_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPrivateKey(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_compound_key_alg_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_compound_key_alg_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ke.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ke.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ke.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_compound_key_alg_encrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureNumber("dataLen",r),s=e._vscf_compound_key_alg_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_compound_key_alg_decrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canSign(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureNumber("hashId",r),ke.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);e._vsc_data(i,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_compound_key_alg_sign_hash(this.ctxPtr,_.ctxPtr,r,i,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(i),e._vsc_buffer_delete(l)}}canVerify(_){let r;return ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_compound_key_alg_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),ke.ensureNumber("hashId",r),ke.ensureByteArray("digest",s),ke.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(s,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),u=e._malloc(d);let v;e._vsc_data(u,f,l);try{return v=e._vscf_compound_key_alg_verify_hash(this.ctxPtr,_.ctxPtr,r,o,u),!!v}finally{e._free(a),e._free(o),e._free(f),e._free(u)}}setupDefaults(){ke.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_compound_key_alg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}makeKey(_,r){ke.ensureNotNull("this.ctxPtr",this.ctxPtr),ke.ensureImplementInterface("cipherKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),ke.ensureImplementInterface("signerKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_compound_key_alg_make_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}}return _},__=(e,t)=>{class _{constructor(t){this.name="HybridKeyAlgInfo",this.ctxPtr=void 0===t?e._vscf_hybrid_key_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_hybrid_key_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_key_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_key_alg_info_alg_id(this.ctxPtr),t}firstKeyAlgInfo(){let _;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_key_alg_info_first_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKeyAlgInfo(){let _;return Ee.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_key_alg_info_second_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},r_=(e,t)=>{class _{constructor(t){this.name="HybridPublicKey",this.ctxPtr=void 0===t?e._vscf_hybrid_public_key_new():t}static newAndUseCContext(t){return new _(e._vscf_hybrid_public_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_public_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_alg_id(this.ctxPtr),t}algInfo(){let _;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_len(this.ctxPtr),t}bitlen(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_bitlen(this.ctxPtr),t}implTag(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_impl_tag(this.ctxPtr),t}isValid(){let t;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_public_key_is_valid(this.ctxPtr),!!t}firstKey(){let _;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_first_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKey(){let _;return we.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_public_key_second_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},s_=(e,t)=>{class _{constructor(t){this.name="HybridPrivateKey",this.ctxPtr=void 0===t?e._vscf_hybrid_private_key_new():t}static newAndUseCContext(t){return new _(e._vscf_hybrid_private_key_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_private_key_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_alg_id(this.ctxPtr),t}algInfo(){let _;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}len(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_len(this.ctxPtr),t}bitlen(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_bitlen(this.ctxPtr),t}implTag(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_impl_tag(this.ctxPtr),t}isValid(){let t;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hybrid_private_key_is_valid(this.ctxPtr),!!t}extractPublicKey(){let _;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_extract_public_key(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}firstKey(){let _;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_first_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}secondKey(){let _;return be.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hybrid_private_key_second_key(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},n_=(e,t)=>{class _{static get CAN_IMPORT_PUBLIC_KEY(){return!0}get CAN_IMPORT_PUBLIC_KEY(){return _.CAN_IMPORT_PUBLIC_KEY}static get CAN_EXPORT_PUBLIC_KEY(){return!0}get CAN_EXPORT_PUBLIC_KEY(){return _.CAN_EXPORT_PUBLIC_KEY}static get CAN_IMPORT_PRIVATE_KEY(){return!0}get CAN_IMPORT_PRIVATE_KEY(){return _.CAN_IMPORT_PRIVATE_KEY}static get CAN_EXPORT_PRIVATE_KEY(){return!0}get CAN_EXPORT_PRIVATE_KEY(){return _.CAN_EXPORT_PRIVATE_KEY}constructor(t){this.name="HybridKeyAlg",this.ctxPtr=void 0===t?e._vscf_hybrid_key_alg_new():t}static newAndUseCContext(t){return new _(e._vscf_hybrid_key_alg_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hybrid_key_alg_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_hybrid_key_alg_release_random(this.ctxPtr),e._vscf_hybrid_key_alg_use_random(this.ctxPtr,_.ctxPtr)}set cipher(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("cipher",_,"Foundation.CipherAuth",t.FoundationInterfaceTag.CIPHER_AUTH,t.FoundationInterface),e._vscf_hybrid_key_alg_release_cipher(this.ctxPtr),e._vscf_hybrid_key_alg_use_cipher(this.ctxPtr,_.ctxPtr)}set hash(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("hash",_,"Foundation.Hash",t.FoundationInterfaceTag.HASH,t.FoundationInterface),e._vscf_hybrid_key_alg_release_hash(this.ctxPtr),e._vscf_hybrid_key_alg_use_hash(this.ctxPtr,_.ctxPtr)}generateEphemeralKey(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_generate_ephemeral_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKey(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureClass("rawKey",_,t.RawPublicKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_import_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPublicKeyData(_,r){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureByteArray("keyData",_),Ne.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_hybrid_key_alg_import_public_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPublicKey(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_export_public_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPublicKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPublicKeyDataLen(_){let r;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_exported_public_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPublicKeyData(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface);const r=this.exportedPublicKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_hybrid_key_alg_export_public_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}importPrivateKey(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureClass("rawKey",_,t.RawPrivateKey);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_import_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.FoundationInterface.newAndTakeCContext(n)}finally{e._free(s)}}importPrivateKeyData(_,r){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureByteArray("keyData",_),Ne.ensureImplementInterface("keyAlgInfo",r,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const s=_.length*_.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(_,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=e._vscf_error_ctx_size(),o=e._malloc(i);let l;e._vscf_error_reset(o);try{l=e._vscf_hybrid_key_alg_import_private_key_data(this.ctxPtr,a,r.ctxPtr,o);const _=e._vscf_error_status(o);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(l)}finally{e._free(n),e._free(a),e._free(o)}}exportPrivateKey(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=e._vscf_error_ctx_size(),s=e._malloc(r);let n;e._vscf_error_reset(s);try{n=e._vscf_hybrid_key_alg_export_private_key(this.ctxPtr,_.ctxPtr,s);const r=e._vscf_error_status(s);return t.FoundationError.handleStatusCode(r),t.RawPrivateKey.newAndTakeCContext(n)}finally{e._free(s)}}exportedPrivateKeyDataLen(_){let r;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_exported_private_key_data_len(this.ctxPtr,_.ctxPtr),r}exportPrivateKeyData(_){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const r=this.exportedPrivateKeyDataLen(_),s=e._vsc_buffer_new_with_capacity(r);try{const r=e._vscf_hybrid_key_alg_export_private_key_data(this.ctxPtr,_.ctxPtr,s);t.FoundationError.handleStatusCode(r);const n=e._vsc_buffer_bytes(s),c=e._vsc_buffer_len(s);return e.HEAPU8.slice(n,n+c)}finally{e._vsc_buffer_delete(s)}}canEncrypt(_,r){let s;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Ne.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_can_encrypt(this.ctxPtr,_.ctxPtr,r),!!s}encryptedLen(_,r){let s;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Ne.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_encrypted_len(this.ctxPtr,_.ctxPtr,r),s}encrypt(_,r){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Ne.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.encryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_hybrid_key_alg_encrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canDecrypt(_,r){let s;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Ne.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_can_decrypt(this.ctxPtr,_.ctxPtr,r),!!s}decryptedLen(_,r){let s;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Ne.ensureNumber("dataLen",r),s=e._vscf_hybrid_key_alg_decrypted_len(this.ctxPtr,_.ctxPtr,r),s}decrypt(_,r){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Ne.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=this.decryptedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{const r=e._vscf_hybrid_key_alg_decrypt(this.ctxPtr,_.ctxPtr,a,o);t.FoundationError.handleStatusCode(r);const s=e._vsc_buffer_bytes(o),n=e._vsc_buffer_len(o);return e.HEAPU8.slice(s,s+n)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}canSign(_){let r;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_can_sign(this.ctxPtr,_.ctxPtr),!!r}signatureLen(_){let r;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_signature_len(this.ctxPtr,_.ctxPtr),r}signHash(_,r,s){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("privateKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Ne.ensureNumber("hashId",r),Ne.ensureByteArray("digest",s);const n=s.length*s.BYTES_PER_ELEMENT,c=e._malloc(n);e.HEAP8.set(s,c);const a=e._vsc_data_ctx_size(),i=e._malloc(a);e._vsc_data(i,c,n);const o=this.signatureLen(_),l=e._vsc_buffer_new_with_capacity(o);try{const s=e._vscf_hybrid_key_alg_sign_hash(this.ctxPtr,_.ctxPtr,r,i,l);t.FoundationError.handleStatusCode(s);const n=e._vsc_buffer_bytes(l),c=e._vsc_buffer_len(l);return e.HEAPU8.slice(n,n+c)}finally{e._free(c),e._free(i),e._vsc_buffer_delete(l)}}canVerify(_){let r;return Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),r=e._vscf_hybrid_key_alg_can_verify(this.ctxPtr,_.ctxPtr),!!r}verifyHash(_,r,s,n){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("publicKey",_,"Foundation.PublicKey",t.FoundationInterfaceTag.PUBLIC_KEY,t.FoundationInterface),Ne.ensureNumber("hashId",r),Ne.ensureByteArray("digest",s),Ne.ensureByteArray("signature",n);const c=s.length*s.BYTES_PER_ELEMENT,a=e._malloc(c);e.HEAP8.set(s,a);const i=e._vsc_data_ctx_size(),o=e._malloc(i);e._vsc_data(o,a,c);const l=n.length*n.BYTES_PER_ELEMENT,f=e._malloc(l);e.HEAP8.set(n,f);const d=e._vsc_data_ctx_size(),u=e._malloc(d);let v;e._vsc_data(u,f,l);try{return v=e._vscf_hybrid_key_alg_verify_hash(this.ctxPtr,_.ctxPtr,r,o,u),!!v}finally{e._free(a),e._free(o),e._free(f),e._free(u)}}setupDefaults(){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_hybrid_key_alg_setup_defaults(this.ctxPtr);t.FoundationError.handleStatusCode(_)}makeKey(_,r){Ne.ensureNotNull("this.ctxPtr",this.ctxPtr),Ne.ensureImplementInterface("firstKey",_,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface),Ne.ensureImplementInterface("secondKey",r,"Foundation.PrivateKey",t.FoundationInterfaceTag.PRIVATE_KEY,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_hybrid_key_alg_make_key(this.ctxPtr,_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}}return _},c_=(e,t)=>{class _{constructor(t){this.name="SimpleAlgInfo",this.ctxPtr=void 0===t?e._vscf_simple_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_simple_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_simple_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithAlgId(t){let r;return Ie.ensureNumber("algId",t),r=e._vscf_simple_alg_info_new_with_alg_id(t),_.newAndTakeCContext(r)}algId(){let t;return Ie.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_simple_alg_info_alg_id(this.ctxPtr),t}}return _},a_=(e,t)=>{class _{constructor(t){this.name="HashBasedAlgInfo",this.ctxPtr=void 0===t?e._vscf_hash_based_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_hash_based_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_hash_based_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Ae.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_hash_based_alg_info_alg_id(this.ctxPtr),t}hashAlgInfo(){let _;return Ae.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_hash_based_alg_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},i_=(e,t)=>{class _{constructor(t){this.name="CipherAlgInfo",this.ctxPtr=void 0===t?e._vscf_cipher_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_cipher_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_cipher_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithMembers(t,r){Ce.ensureNumber("algId",t),Ce.ensureByteArray("nonce",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);let i;e._vsc_data(a,n,s);try{return i=e._vscf_cipher_alg_info_new_with_members(t,a),_.newAndTakeCContext(i)}finally{e._free(n),e._free(a)}}algId(){let t;return Ce.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_cipher_alg_info_alg_id(this.ctxPtr),t}nonce(){Ce.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_cipher_alg_info_nonce(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}}return _},o_=(e,t)=>{class _{constructor(t){this.name="SaltedKdfAlgInfo",this.ctxPtr=void 0===t?e._vscf_salted_kdf_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_salted_kdf_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_salted_kdf_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Te.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_salted_kdf_alg_info_alg_id(this.ctxPtr),t}hashAlgInfo(){let _;return Te.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_salted_kdf_alg_info_hash_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}salt(){Te.ensureNotNull("this.ctxPtr",this.ctxPtr);const t=e._vsc_data_ctx_size(),_=e._malloc(t);try{e._vscf_salted_kdf_alg_info_salt(_,this.ctxPtr);const t=e._vsc_data_len(_),r=e._vsc_data_bytes(_);return e.HEAPU8.slice(r,r+t)}finally{e._free(_)}}iterationCount(){let t;return Te.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_salted_kdf_alg_info_iteration_count(this.ctxPtr),t}}return _},l_=(e,t)=>{class _{constructor(t){this.name="PbeAlgInfo",this.ctxPtr=void 0===t?e._vscf_pbe_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_pbe_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_pbe_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}algId(){let t;return Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_pbe_alg_info_alg_id(this.ctxPtr),t}kdfAlgInfo(){let _;return Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pbe_alg_info_kdf_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}cipherAlgInfo(){let _;return Fe.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_pbe_alg_info_cipher_alg_info(this.ctxPtr),t.FoundationInterface.newAndUseCContext(_)}}return _},f_=(e,t)=>{class _{constructor(t){this.name="EccAlgInfo",this.ctxPtr=void 0===t?e._vscf_ecc_alg_info_new():t}static newAndUseCContext(t){return new _(e._vscf_ecc_alg_info_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_ecc_alg_info_delete(this.ctxPtr),this.ctxPtr=null)}static newWithMembers(t,r,s){let n;return Ke.ensureNumber("algId",t),Ke.ensureNumber("keyId",r),Ke.ensureNumber("domainId",s),n=e._vscf_ecc_alg_info_new_with_members(t,r,s),_.newAndTakeCContext(n)}algId(){let t;return Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_alg_id(this.ctxPtr),t}keyId(){let t;return Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_key_id(this.ctxPtr),t}domainId(){let t;return Ke.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_ecc_alg_info_domain_id(this.ctxPtr),t}}return _},d_=(e,t)=>{class _{constructor(t){this.name="AlgInfoDerSerializer",this.ctxPtr=void 0===t?e._vscf_alg_info_der_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_alg_info_der_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_alg_info_der_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Writer(_){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_alg_info_der_serializer_release_asn1_writer(this.ctxPtr),e._vscf_alg_info_der_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedLen(_){let r;return Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_info_der_serializer_serialized_len(this.ctxPtr,_.ctxPtr),r}serialize(_){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=this.serializedLen(_),s=e._vsc_buffer_new_with_capacity(r);try{e._vscf_alg_info_der_serializer_serialize(this.ctxPtr,_.ctxPtr,s);const t=e._vsc_buffer_bytes(s),r=e._vsc_buffer_len(s);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(s)}}setupDefaults(){Se.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_alg_info_der_serializer_setup_defaults(this.ctxPtr)}serializeInplace(_){let r;return Se.ensureNotNull("this.ctxPtr",this.ctxPtr),Se.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_info_der_serializer_serialize_inplace(this.ctxPtr,_.ctxPtr),r}}return _},u_=(e,t)=>{class _{constructor(t){this.name="AlgInfoDerDeserializer",this.ctxPtr=void 0===t?e._vscf_alg_info_der_deserializer_new():t}static newAndUseCContext(t){return new _(e._vscf_alg_info_der_deserializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_alg_info_der_deserializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",t.FoundationInterfaceTag.ASN1_READER,t.FoundationInterface),e._vscf_alg_info_der_deserializer_release_asn1_reader(this.ctxPtr),e._vscf_alg_info_der_deserializer_use_asn1_reader(this.ctxPtr,_.ctxPtr)}deserialize(_){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),Le.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);let o;e._vscf_error_reset(i);try{o=e._vscf_alg_info_der_deserializer_deserialize(this.ctxPtr,c,i);const _=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(i)}}setupDefaults(){Le.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_alg_info_der_deserializer_setup_defaults(this.ctxPtr)}deserializeInplace(){Le.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=e._vscf_error_ctx_size(),r=e._malloc(_);let s;e._vscf_error_reset(r);try{s=e._vscf_alg_info_der_deserializer_deserialize_inplace(this.ctxPtr,r);const _=e._vscf_error_status(r);return t.FoundationError.handleStatusCode(_),t.FoundationInterface.newAndTakeCContext(s)}finally{e._free(r)}}}return _},v_=(e,t)=>{class _{static get PREFIX_LEN(){return 32}get PREFIX_LEN(){return _.PREFIX_LEN}constructor(t){this.name="MessageInfoDerSerializer",this.ctxPtr=void 0===t?e._vscf_message_info_der_serializer_new():t}static newAndUseCContext(t){return new _(e._vscf_message_info_der_serializer_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_message_info_der_serializer_delete(this.ctxPtr),this.ctxPtr=null)}set asn1Reader(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureImplementInterface("asn1Reader",_,"Foundation.Asn1Reader",t.FoundationInterfaceTag.ASN1_READER,t.FoundationInterface),e._vscf_message_info_der_serializer_release_asn1_reader(this.ctxPtr),e._vscf_message_info_der_serializer_use_asn1_reader(this.ctxPtr,_.ctxPtr)}set asn1Writer(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureImplementInterface("asn1Writer",_,"Foundation.Asn1Writer",t.FoundationInterfaceTag.ASN1_WRITER,t.FoundationInterface),e._vscf_message_info_der_serializer_release_asn1_writer(this.ctxPtr),e._vscf_message_info_der_serializer_use_asn1_writer(this.ctxPtr,_.ctxPtr)}serializedLen(_){let r;return Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureClass("messageInfo",_,t.MessageInfo),r=e._vscf_message_info_der_serializer_serialized_len(this.ctxPtr,_.ctxPtr),r}serialize(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureClass("messageInfo",_,t.MessageInfo);const r=this.serializedLen(_),s=e._vsc_buffer_new_with_capacity(r);try{e._vscf_message_info_der_serializer_serialize(this.ctxPtr,_.ctxPtr,s);const t=e._vsc_buffer_bytes(s),r=e._vsc_buffer_len(s);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(s)}}readPrefix(t){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_message_info_der_serializer_read_prefix(this.ctxPtr,n),c}finally{e._free(r),e._free(n)}}deserialize(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);let o;e._vscf_error_reset(i);try{o=e._vscf_message_info_der_serializer_deserialize(this.ctxPtr,c,i);const _=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(_),t.MessageInfo.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(i)}}serializedFooterLen(_){let r;return Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureClass("messageInfoFooter",_,t.MessageInfoFooter),r=e._vscf_message_info_der_serializer_serialized_footer_len(this.ctxPtr,_.ctxPtr),r}serializeFooter(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureClass("messageInfoFooter",_,t.MessageInfoFooter);const r=this.serializedFooterLen(_),s=e._vsc_buffer_new_with_capacity(r);try{e._vscf_message_info_der_serializer_serialize_footer(this.ctxPtr,_.ctxPtr,s);const t=e._vsc_buffer_bytes(s),r=e._vsc_buffer_len(s);return e.HEAPU8.slice(t,t+r)}finally{e._vsc_buffer_delete(s)}}deserializeFooter(_){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),Re.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=e._vscf_error_ctx_size(),i=e._malloc(a);let o;e._vscf_error_reset(i);try{o=e._vscf_message_info_der_serializer_deserialize_footer(this.ctxPtr,c,i);const _=e._vscf_error_status(i);return t.FoundationError.handleStatusCode(_),t.MessageInfoFooter.newAndTakeCContext(o)}finally{e._free(s),e._free(c),e._free(i)}}setupDefaults(){Re.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_message_info_der_serializer_setup_defaults(this.ctxPtr)}}return _},h_=(e,t)=>{class _{constructor(t){this.name="RandomPadding",this.ctxPtr=void 0===t?e._vscf_random_padding_new():t}static newAndUseCContext(t){return new _(e._vscf_random_padding_shallow_copy(t))}static newAndTakeCContext(e){return new _(e)}delete(){void 0!==this.ctxPtr&&null!==this.ctxPtr&&(e._vscf_random_padding_delete(this.ctxPtr),this.ctxPtr=null)}set random(_){ze.ensureNotNull("this.ctxPtr",this.ctxPtr),ze.ensureImplementInterface("random",_,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),e._vscf_random_padding_release_random(this.ctxPtr),e._vscf_random_padding_use_random(this.ctxPtr,_.ctxPtr)}algId(){let t;return ze.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_alg_id(this.ctxPtr),t}produceAlgInfo(){let _;return ze.ensureNotNull("this.ctxPtr",this.ctxPtr),_=e._vscf_random_padding_produce_alg_info(this.ctxPtr),t.FoundationInterface.newAndTakeCContext(_)}restoreAlgInfo(_){ze.ensureNotNull("this.ctxPtr",this.ctxPtr),ze.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface);const r=e._vscf_random_padding_restore_alg_info(this.ctxPtr,_.ctxPtr);t.FoundationError.handleStatusCode(r)}configure(_){ze.ensureNotNull("this.ctxPtr",this.ctxPtr),ze.ensureClass("params",_,t.PaddingParams),e._vscf_random_padding_configure(this.ctxPtr,_.ctxPtr)}paddedDataLen(t){let _;return ze.ensureNotNull("this.ctxPtr",this.ctxPtr),ze.ensureNumber("dataLen",t),_=e._vscf_random_padding_padded_data_len(this.ctxPtr,t),_}len(){let t;return ze.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_len(this.ctxPtr),t}lenMax(){let t;return ze.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_len_max(this.ctxPtr),t}startDataProcessing(){ze.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_random_padding_start_data_processing(this.ctxPtr)}processData(t){ze.ensureNotNull("this.ctxPtr",this.ctxPtr),ze.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=e._vsc_data_ctx_size(),a=e._malloc(c);try{e._vscf_random_padding_process_data(a,this.ctxPtr,n);const t=e._vsc_data_len(a),_=e._vsc_data_bytes(a);return e.HEAPU8.slice(_,_+t)}finally{e._free(r),e._free(n),e._free(a)}}finishDataProcessing(){ze.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.len(),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_random_padding_finish_data_processing(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}startPaddedDataProcessing(){ze.ensureNotNull("this.ctxPtr",this.ctxPtr),e._vscf_random_padding_start_padded_data_processing(this.ctxPtr)}processPaddedData(t){ze.ensureNotNull("this.ctxPtr",this.ctxPtr),ze.ensureByteArray("data",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=_,a=e._vsc_buffer_new_with_capacity(c);try{e._vscf_random_padding_process_padded_data(this.ctxPtr,n,a);const t=e._vsc_buffer_bytes(a),_=e._vsc_buffer_len(a);return e.HEAPU8.slice(t,t+_)}finally{e._free(r),e._free(n),e._vsc_buffer_delete(a)}}finishPaddedDataProcessingOutLen(){let t;return ze.ensureNotNull("this.ctxPtr",this.ctxPtr),t=e._vscf_random_padding_finish_padded_data_processing_out_len(this.ctxPtr),t}finishPaddedDataProcessing(){ze.ensureNotNull("this.ctxPtr",this.ctxPtr);const _=this.finishPaddedDataProcessingOutLen(),r=e._vsc_buffer_new_with_capacity(_);try{const _=e._vscf_random_padding_finish_padded_data_processing(this.ctxPtr,r);t.FoundationError.handleStatusCode(_);const s=e._vsc_buffer_bytes(r),n=e._vsc_buffer_len(r);return e.HEAPU8.slice(s,s+n)}finally{e._vsc_buffer_delete(r)}}}return _};var p_=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((e=>new Promise(((t,_)=>{De(e).then((e=>{const _={};_.FoundationInterfaceTag=Ue(),_.FoundationInterface=Me(e,_),_.FoundationImplTag=Be(),_.FoundationError=Oe(),_.Asn1Tag=Ye(),_.AlgId=He(),_.OidId=Ge(),_.GroupMsgType=Ve(),_.CipherState=We(),_.Oid=((e,t)=>class{static fromAlgId(t){o.ensureNumber("algId",t);const _=e._vsc_data_ctx_size(),r=e._malloc(_);try{e._vscf_oid_from_alg_id(r,t);const _=e._vsc_data_len(r),s=e._vsc_data_bytes(r);return e.HEAPU8.slice(s,s+_)}finally{e._free(r)}}static toAlgId(t){o.ensureByteArray("oid",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_oid_to_alg_id(n),c}finally{e._free(r),e._free(n)}}static fromId(t){o.ensureNumber("oidId",t);const _=e._vsc_data_ctx_size(),r=e._malloc(_);try{e._vscf_oid_from_id(r,t);const _=e._vsc_data_len(r),s=e._vsc_data_bytes(r);return e.HEAPU8.slice(s,s+_)}finally{e._free(r)}}static toId(t){o.ensureByteArray("oid",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);let c;e._vsc_data(n,r,_);try{return c=e._vscf_oid_to_id(n),c}finally{e._free(r),e._free(n)}}static idToAlgId(t){let _;return o.ensureNumber("oidId",t),_=e._vscf_oid_id_to_alg_id(t),_}static equal(t,_){o.ensureByteArray("lhs",t),o.ensureByteArray("rhs",_);const r=t.length*t.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(t,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=_.length*_.BYTES_PER_ELEMENT,i=e._malloc(a);e.HEAP8.set(_,i);const l=e._vsc_data_ctx_size(),f=e._malloc(l);let d;e._vsc_data(f,i,a);try{return d=e._vscf_oid_equal(c,f),!!d}finally{e._free(s),e._free(c),e._free(i),e._free(f)}}})(e),_.Base64=((e,t)=>class{static encodedLen(t){let _;return l.ensureNumber("dataLen",t),_=e._vscf_base64_encoded_len(t),_}static encode(_){l.ensureByteArray("data",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=t.Base64.encodedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{e._vscf_base64_encode(c,i);const t=e._vsc_buffer_bytes(i),_=e._vsc_buffer_len(i);return e.HEAPU8.slice(t,t+_)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}static decodedLen(t){let _;return l.ensureNumber("strLen",t),_=e._vscf_base64_decoded_len(t),_}static decode(_){l.ensureByteArray("str",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=t.Base64.decodedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_base64_decode(c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}})(e,_),_.Pem=((e,t)=>class{static wrappedLen(t,_){let r;return f.ensureNumber("title",t),f.ensureNumber("dataLen",_),r=e._vscf_pem_wrapped_len(t,_),r}static wrap(_,r){f.ensureNumber("title",_),f.ensureByteArray("data",r);const s=r.length*r.BYTES_PER_ELEMENT,n=e._malloc(s);e.HEAP8.set(r,n);const c=e._vsc_data_ctx_size(),a=e._malloc(c);e._vsc_data(a,n,s);const i=t.Pem.wrappedLen(_,r.length),o=e._vsc_buffer_new_with_capacity(i);try{e._vscf_pem_wrap(_,a,o);const t=e._vsc_buffer_bytes(o),r=e._vsc_buffer_len(o);return e.HEAPU8.slice(t,t+r)}finally{e._free(n),e._free(a),e._vsc_buffer_delete(o)}}static unwrappedLen(t){let _;return f.ensureNumber("pemLen",t),_=e._vscf_pem_unwrapped_len(t),_}static unwrap(_){f.ensureByteArray("pem",_);const r=_.length*_.BYTES_PER_ELEMENT,s=e._malloc(r);e.HEAP8.set(_,s);const n=e._vsc_data_ctx_size(),c=e._malloc(n);e._vsc_data(c,s,r);const a=t.Pem.unwrappedLen(_.length),i=e._vsc_buffer_new_with_capacity(a);try{const _=e._vscf_pem_unwrap(c,i);t.FoundationError.handleStatusCode(_);const r=e._vsc_buffer_bytes(i),s=e._vsc_buffer_len(i);return e.HEAPU8.slice(r,r+s)}finally{e._free(s),e._free(c),e._vsc_buffer_delete(i)}}static title(t){f.ensureByteArray("pem",t);const _=t.length*t.BYTES_PER_ELEMENT,r=e._malloc(_);e.HEAP8.set(t,r);const s=e._vsc_data_ctx_size(),n=e._malloc(s);e._vsc_data(n,r,_);const c=e._vsc_data_ctx_size(),a=e._malloc(c);try{e._vscf_pem_title(a,n);const t=e._vsc_data_len(a),_=e._vsc_data_bytes(a);return e.HEAPU8.slice(_,_+t)}finally{e._free(r),e._free(n),e._free(a)}}})(e,_),_.MessageInfo=Xe(e,_),_.KeyRecipientInfo=je(e,_),_.KeyRecipientInfoList=qe(e,_),_.PasswordRecipientInfo=Ze(e,_),_.PasswordRecipientInfoList=$e(e,_),_.AlgFactory=((e,t)=>class{static createHashFromInfo(_){let r;return y.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_hash_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createMacFromInfo(_){let r;return y.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_mac_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createKdfFromInfo(_){let r;return y.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_kdf_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createSaltedKdfFromInfo(_){let r;return y.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_salted_kdf_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createCipherFromInfo(_){let r;return y.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),r=e._vscf_alg_factory_create_cipher_from_info(_.ctxPtr),t.FoundationInterface.newAndTakeCContext(r)}static createPaddingFromInfo(_,r){let s;return y.ensureImplementInterface("algInfo",_,"Foundation.AlgInfo",t.FoundationInterfaceTag.ALG_INFO,t.FoundationInterface),y.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface),s=e._vscf_alg_factory_create_padding_from_info(_.ctxPtr,r.ctxPtr),t.FoundationInterface.newAndTakeCContext(s)}})(e,_),_.KeyAlgFactory=((e,t)=>class{static createFromAlgId(_,r){P.ensureNumber("algId",_),P.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_alg_factory_create_from_alg_id(_,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}static createFromKey(_,r){P.ensureImplementInterface("key",_,"Foundation.Key",t.FoundationInterfaceTag.KEY,t.FoundationInterface),P.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_alg_factory_create_from_key(_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}static createFromRawPublicKey(_,r){P.ensureClass("publicKey",_,t.RawPublicKey),P.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_alg_factory_create_from_raw_public_key(_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}static createFromRawPrivateKey(_,r){P.ensureClass("privateKey",_,t.RawPrivateKey),P.ensureImplementInterface("random",r,"Foundation.Random",t.FoundationInterfaceTag.RANDOM,t.FoundationInterface);const s=e._vscf_error_ctx_size(),n=e._malloc(s);let c;e._vscf_error_reset(n);try{c=e._vscf_key_alg_factory_create_from_raw_private_key(_.ctxPtr,r.ctxPtr,n);const s=e._vscf_error_status(n);return t.FoundationError.handleStatusCode(s),t.FoundationInterface.newAndTakeCContext(c)}finally{e._free(n)}}})(e,_),_.Ecies=Je(e,_),_.RecipientCipher=Qe(e,_),_.MessageInfoCustomParams=et(e,_),_.KeyProvider=tt(e,_),_.Signer=_t(e,_),_.Verifier=rt(e,_),_.BrainkeyClient=st(e,_),_.BrainkeyServer=nt(e,_),_.GroupSessionMessage=ct(e,_),_.GroupSessionTicket=at(e,_),_.GroupSession=it(e,_),_.MessageInfoEditor=ot(e,_),_.SignerInfo=lt(e,_),_.SignerInfoList=ft(e,_),_.MessageInfoFooter=dt(e,_),_.SignedDataInfo=ut(e,_),_.FooterInfo=vt(e,_),_.KeyInfo=ht(e,_),_.PaddingParams=pt(e),_.Sha224=yt(e,_),_.Sha256=Pt(e,_),_.Sha384=mt(e,_),_.Sha512=gt(e,_),_.Aes256Gcm=xt(e,_),_.Aes256Cbc=kt(e,_),_.Asn1rd=Et(e,_),_.Asn1wr=wt(e,_),_.RsaPublicKey=bt(e,_),_.RsaPrivateKey=Nt(e,_),_.Rsa=It(e,_),_.EccPublicKey=At(e,_),_.EccPrivateKey=Ct(e,_),_.Ecc=Tt(e,_),_.EntropyAccumulator=Ft(e,_),_.CtrDrbg=Kt(e,_),_.Hmac=St(e,_),_.Hkdf=Lt(e,_),_.Kdf1=Rt(e,_),_.Kdf2=zt(e,_),_.FakeRandom=Dt(e,_),_.Pkcs5Pbkdf2=Ut(e,_),_.Pkcs5Pbes2=Mt(e,_),_.SeedEntropySource=Bt(e,_),_.KeyMaterialRng=Ot(e,_),_.RawPublicKey=Yt(e,_),_.RawPrivateKey=Ht(e,_),_.Pkcs8Serializer=Gt(e,_),_.Sec1Serializer=Vt(e,_),_.KeyAsn1Serializer=Wt(e,_),_.KeyAsn1Deserializer=Xt(e,_),_.Ed25519=jt(e,_),_.Curve25519=qt(e,_),_.Falcon=Zt(e,_),_.Round5=$t(e,_),_.CompoundKeyAlgInfo=Jt(e,_),_.CompoundPublicKey=Qt(e,_),_.CompoundPrivateKey=e_(e,_),_.CompoundKeyAlg=t_(e,_),_.HybridKeyAlgInfo=__(e,_),_.HybridPublicKey=r_(e,_),_.HybridPrivateKey=s_(e,_),_.HybridKeyAlg=n_(e,_),_.SimpleAlgInfo=c_(e),_.HashBasedAlgInfo=a_(e,_),_.CipherAlgInfo=i_(e),_.SaltedKdfAlgInfo=o_(e,_),_.PbeAlgInfo=l_(e,_),_.EccAlgInfo=f_(e),_.AlgInfoDerSerializer=d_(e,_),_.AlgInfoDerDeserializer=u_(e,_),_.MessageInfoDerSerializer=v_(e,_),_.RandomPadding=h_(e,_),t(_)})).catch((e=>{_(e)}))}))));let y_,P_;const m_=()=>{if(!y_||!P_)throw new Error("Cannot use global instances if the 'resetGlobalInstances' function has been called or 'createGlobalInstances' function has not been called yet.")},g_=()=>(m_(),y_),x_=()=>(m_(),P_),k_=()=>{(y_||P_)&&(m_(),y_.delete(),P_.delete(),y_=void 0,P_=void 0)},E_=new e,w_="foundation";E_.addModule(w_,p_),E_.on("load",((e,t)=>{e===w_&&(k_(),(e=>{y_=new e.CtrDrbg;try{y_.setupDefaults()}catch(e){throw y_.delete(),e}P_=new e.KeyProvider,P_.random=y_;try{P_.setupDefaults()}catch(e){throw y_.delete(),P_.delete(),e}})(t))})),E_.on("remove",(e=>{e===w_&&k_()}));const b_=()=>E_.hasModule(w_),N_=()=>E_.getModule(w_),I_=e=>{E_.setModule(w_,e)},A_=E_.loadModules;var C_,T_;!function(e){e.SHA224="SHA224",e.SHA256="SHA256",e.SHA384="SHA384",e.SHA512="SHA512"}(C_||(C_={})),function(e){e.DEFAULT="DEFAULT",e.ED25519="ED25519",e.CURVE25519="CURVE25519",e.SECP256R1="SECP256R1",e.RSA_2048="RSA_2048",e.RSA_3072="RSA_3072",e.RSA_4096="RSA_4096",e.RSA_8192="RSA_8192",e.CURVE25519_ROUND5_ED25519_FALCON="CURVE25519_ROUND5_ED25519_FALCON",e.CURVE25519_ED25519="CURVE25519_ED25519"}(T_||(T_={}));const F_=e=>{const{AlgId:t}=E_.getModule("foundation");switch(e){case T_.DEFAULT:return{type:T_.DEFAULT,algId:t.ED25519};case T_.ED25519:return{type:T_.ED25519,algId:t.ED25519};case T_.CURVE25519:return{type:T_.CURVE25519,algId:t.CURVE25519};case T_.SECP256R1:return{type:T_.SECP256R1,algId:t.SECP256R1};case T_.RSA_2048:return{type:T_.RSA_2048,algId:t.RSA,bitlen:2048};case T_.RSA_3072:return{type:T_.RSA_3072,algId:t.RSA,bitlen:3072};case T_.RSA_4096:return{type:T_.RSA_4096,algId:t.RSA,bitlen:4096};case T_.RSA_8192:return{type:T_.RSA_8192,algId:t.RSA,bitlen:8192};case T_.CURVE25519_ROUND5_ED25519_FALCON:return{type:T_.CURVE25519_ROUND5_ED25519_FALCON,cipherAlgIds:[t.CURVE25519,t.ROUND5_ND_1CCA_5D],signerAlgIds:[t.ED25519,t.FALCON]};case T_.CURVE25519_ED25519:return{type:T_.CURVE25519_ED25519,cipherAlgIds:[t.CURVE25519,t.NONE],signerAlgIds:[t.ED25519,t.NONE]};default:throw new TypeError(`Unknown key pair type '${e}'.`)}},K_=t.from("VIRGIL-DATA-SIGNATURE","utf8"),S_=t.from("VIRGIL-DATA-SIGNER-ID","utf8"),L_=160;class R_{get isDisposed(){return this._isDisposed}constructor(e,t){this.identifier=_(e),this.lowLevelPrivateKey=t,this._isDisposed=!1}dispose(){this.lowLevelPrivateKey.delete(),this._isDisposed=!0}}class z_{get isDisposed(){return this._isDisposed}get key(){const e=new(N_().KeyAsn1Serializer);try{return e.setupDefaults(),e.serializePublicKey(this.lowLevelPublicKey)}finally{e.delete()}}constructor(e,t){this.identifier=_(e),this.lowLevelPublicKey=t,this._isDisposed=!1}dispose(){this.lowLevelPublicKey.delete(),this._isDisposed=!0}}function D_(e){if(!(e instanceof R_))throw new TypeError("An argument is not an instance of 'VirgilPrivateKey' class.");if(e.isDisposed)throw new TypeError("Cannot use an instance of 'VirgilPrivateKey' class after it was disposed.")}function U_(e){if(!(e instanceof z_))throw new TypeError("An argument is not a 'VirgilPublicKey'.");if(e.isDisposed)throw new TypeError("Cannot use an instance of 'VirgilPublicKey' class after it was disposed.")}function M_(e){if(!Array.isArray(e))throw new TypeError("An argument is not an array.");if(!e.length)throw new TypeError("An array of 'VirgilPublicKey' instances should not be empty.");e.forEach(U_)}function B_(e){if(!(e instanceof Uint8Array))throw new TypeError("An argument is not an instance of 'Uint8Array' class.");if(e.byteLength<10)throw new TypeError("An argument byte length is too small. Expected to be at least '10' bytes.")}function O_(e){const t=N_().GroupSessionMessage.deserialize(e),r={epochNumber:t.getEpoch(),sessionId:_(t.getSessionId()).toString("hex"),data:_(e).toString("base64")};return t.delete(),r}function Y_(e){const t=N_().GroupSessionMessage.deserialize(e),_=t.getEpoch();return t.delete(),_}function H_(e){const t=new(N_().GroupSession);t.rng=g_();const _=[];try{for(const r of e){const e=N_().GroupSessionMessage.deserialize(r);_.push(e),t.addEpoch(e)}return t}finally{for(;_.length;){const e=_.pop();e&&e.delete()}}}function G_(e){const t=new(N_().Sha512);try{return t.hash(e).subarray(0,32)}finally{t.delete()}}function V_(e){return e=e.slice().sort(((e,t)=>Y_(e)-Y_(t))),{getSessionId(){const t=H_(e),r=t.getSessionId();return t.delete(),_(r).toString("hex")},getCurrentEpochNumber:()=>Y_(e[e.length-1]),encrypt(t,s){const n=r(t,"utf8");let c;D_(s);try{c=H_(e);const t=c.encrypt(n,s.lowLevelPrivateKey),r=t.serialize();return t.delete(),_(r)}finally{c&&c.delete()}},decrypt(t,s){const n=r(t,"base64");let c,a;U_(s);try{return c=H_(e),a=N_().GroupSessionMessage.deserialize(n),_(c.decrypt(a,s.lowLevelPublicKey))}finally{a&&a.delete(),c&&c.delete()}},addNewEpoch(){const t=H_(e);try{const _=t.createGroupTicket(),r=_.getTicketMessage(),s=r.serialize();return e.push(s),r.delete(),_.delete(),O_(s)}finally{t.delete()}},export:()=>e.map(_),parseMessage:e=>O_(r(e,"base64"))}}const W_=e=>null==e?[]:Array.isArray(e)?e:[e];var X_;!function(e){e.STREAM_ILLEGAL_STATE="STREAM_ILLEGAL_STATE",e.DATA_NOT_SIGNED="DATA_NOT_SIGNED",e.SIGNER_NOT_FOUND="SIGNER_NOT_FOUND",e.INVALID_SIGNATURE="INVALID_SIGNATURE"}(X_||(X_={}));class j_ extends Error{constructor(e,t){super(t||j_.DEFAULT_MESSAGE),Object.setPrototypeOf(this,j_.prototype),this.name="VirgilCryptoError",this.status=e}}j_.DEFAULT_MESSAGE="Use the 'status' property and 'VirgilCryptoErrorStatus' enum to check for specific error.";class q_{get isRunning(){return this._isRunning}get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e,t){const _=N_(),s=W_(e);if(M_(s),this.recipientCipher=new _.RecipientCipher,this.aes256Gcm=new _.Aes256Gcm,this.recipientCipher.encryptionCipher=this.aes256Gcm,this.recipientCipher.random=g_(),s.forEach((e=>{this.recipientCipher.addKeyRecipient(e.identifier,e.lowLevelPublicKey)})),t){const e=r(t,"base64");this.messageInfoCustomParams=this.recipientCipher.customParams(),this.messageInfoCustomParams.addData(K_,e)}this._isFinished=!1,this._isRunning=!1,this._isDisposed=!1}start(){return this.ensureLegalState(),this.recipientCipher.startEncryption(),this._isRunning=!0,_(this.recipientCipher.packMessageInfo())}update(e){this.ensureLegalState(),this.ensureIsRunning();const t=r(e,"utf8");return _(this.recipientCipher.processEncryption(t))}final(e=!0){this.ensureLegalState(),this.ensureIsRunning();try{return _(this.recipientCipher.finishEncryption())}finally{this._isFinished=!0,this._isRunning=!1,e&&this.dispose()}}dispose(){this.messageInfoCustomParams&&this.messageInfoCustomParams.delete(),this.aes256Gcm.delete(),this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}ensureIsRunning(){if(!this._isRunning)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher before the 'start' method.")}}class Z_{get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e){this._isFinished=!1,this._isDisposed=!1;const t=N_();D_(e),this.recipientCipher=new t.RecipientCipher;try{this.recipientCipher.startDecryptionWithKey(e.identifier,e.lowLevelPrivateKey,new Uint8Array)}catch(e){throw this.recipientCipher.delete(),e}}getSignature(){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot get signature after the 'dispose' method has been called.");if(!this._isFinished)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot get signature before the 'final' method has been called.");const e=this.recipientCipher.customParams();try{return _(e.findData(K_))}finally{e.delete()}}update(e){this.ensureLegalState();const t=r(e,"utf8");return _(this.recipientCipher.processDecryption(t))}final(e=!0){this.ensureLegalState();try{return _(this.recipientCipher.finishDecryption())}finally{this._isFinished=!0,e&&this.dispose()}}dispose(){this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}}class $_{constructor(){const e=N_();this.paddingParams=e.PaddingParams.newWithConstraints(L_,L_),this.recipientCipher=new e.RecipientCipher,this.recipientCipher.random=g_(),this.recipientCipher.paddingParams=this.paddingParams,this._isDisposed=!1,this._isFinished=!1}start(e){this.ensureLegalState(),D_(e),this.recipientCipher.startDecryptionWithKey(e.identifier,e.lowLevelPrivateKey,new Uint8Array)}update(e){this.ensureLegalState();const t=r(e),s=this.recipientCipher.processDecryption(t);return _(s)}final(){this.ensureLegalState();const e=this.recipientCipher.finishDecryption();try{return _(e)}finally{this._isFinished=!0}}verify(e,_=!0){const r=W_(e);if(M_(r),this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot verify signature after the 'dispose' method has been called.");if(!this._isFinished)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot verify signature before the 'final' method has been called.");let s;try{if(!this.recipientCipher.isDataSigned())throw new j_(X_.DATA_NOT_SIGNED);if(s=this.recipientCipher.signerInfos(),!s.hasItem())throw new j_(X_.DATA_NOT_SIGNED);const e=s.item();let _;for(let s=0;s<r.length;s+=1){if(0===t.compare(e.signerId(),r[s].identifier)){_=r[s];break}if(s===r.length-1)throw new j_(X_.SIGNER_NOT_FOUND)}if(!this.recipientCipher.verifySignerInfo(e,_.lowLevelPublicKey))throw new j_(X_.INVALID_SIGNATURE)}finally{s&&s.delete(),_&&this.dispose()}}dispose(){this.paddingParams.delete(),this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}}class J_{get isRunning(){return this._isRunning}get isFinished(){return this._isFinished}get isDisposed(){return this._isDisposed}constructor(e,t,_){D_(e);const r=W_(t);M_(r);const s=N_(),n=g_();this.recipientCipher=new s.RecipientCipher,this.aes256Gcm=new s.Aes256Gcm,this.sha512=new s.Sha512,this.recipientCipher.encryptionCipher=this.aes256Gcm,this.recipientCipher.random=n,this.recipientCipher.signerHash=this.sha512,_&&(this.randomPadding=new s.RandomPadding,this.randomPadding.random=n,this.recipientCipher.encryptionPadding=this.randomPadding,this.paddingParams=s.PaddingParams.newWithConstraints(L_,L_),this.recipientCipher.paddingParams=this.paddingParams),r.forEach((e=>{this.recipientCipher.addKeyRecipient(e.identifier,e.lowLevelPublicKey)}));try{this.recipientCipher.addSigner(e.identifier,e.lowLevelPrivateKey),this._isDisposed=!1,this._isRunning=!1,this._isFinished=!1}catch(e){throw this.dispose(),e}}start(e){this.ensureLegalState(),this.recipientCipher.startSignedEncryption(e);const t=this.recipientCipher.packMessageInfo();return this._isRunning=!0,_(t)}update(e){this.ensureLegalState(),this.ensureIsRunning();const t=r(e),s=this.recipientCipher.processEncryption(t);return _(s)}final(e=!0){this.ensureLegalState(),this.ensureIsRunning();const _=this.recipientCipher.finishEncryption(),r=this.recipientCipher.packMessageInfoFooter();try{return t.concat([_,r])}finally{this._isFinished=!0,this._isRunning=!1,e&&this.dispose()}}dispose(){this.sha512.delete(),this.aes256Gcm.delete(),this.randomPadding&&this.randomPadding.delete(),this.paddingParams&&this.paddingParams.delete(),this.recipientCipher.delete(),this._isDisposed=!0}ensureLegalState(){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'dispose' method has been called.");if(this._isFinished)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher after the 'final' method has been called.")}ensureIsRunning(){if(!this._isRunning)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use cipher before the 'start' method.")}}class Q_{get isDisposed(){return this._isDisposed}constructor(){this._isDisposed=!1;const e=N_();this.signer=new e.Signer,this.sha512=new e.Sha512,this.signer.hash=this.sha512,this.signer.random=g_(),this.signer.reset()}update(e){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use signer after the 'dispose' method has been called.");const t=r(e,"utf8");return this.signer.appendData(t),this}sign(e,t=!0){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. The VirgilStreamSigner has been disposed. Pass 'false' as the second argument to the 'sign' method if you need to generate more than one signature.");D_(e);const r=this.signer.sign(e.lowLevelPrivateKey);return t&&this.dispose(),_(r)}dispose(){this.sha512.delete(),this.signer.delete(),this._isDisposed=!0}}class er{get isDisposed(){return this._isDisposed}constructor(e){this._isDisposed=!1;const t=N_(),_=r(e,"base64");this.verifier=new t.Verifier;try{this.verifier.reset(_)}catch(e){throw this.verifier.delete(),e}}update(e){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. Cannot use signer after the 'dispose' method has been called.");const t=r(e,"utf8");return this.verifier.appendData(t),this}verify(e,t=!0){if(this._isDisposed)throw new j_(X_.STREAM_ILLEGAL_STATE,"Illegal state. The VirgilStreamVerifier has been disposed. Pass 'false' as the second argument to the 'verify' method if you need to verify with more than one public key.");U_(e);const _=this.verifier.verify(e.lowLevelPublicKey);return t&&this.dispose(),_}dispose(){this.verifier.delete(),this._isDisposed=!0}}class tr{constructor(e={}){this.hashAlgorithm=C_,this.keyPairType=T_,this.defaultKeyPairType=e.defaultKeyPairType||T_.DEFAULT,this.useSha256Identifiers=e.useSha256Identifiers||!1}generateKeys(e){const t=e||this.defaultKeyPairType,_=F_(t);return this.generateKeyPair(x_(),_)}generateKeysFromKeyMaterial(e,t){const _=t||this.defaultKeyPairType,s=F_(_),n=r(e,"base64"),c=N_(),a=new c.KeyMaterialRng;a.resetKeyMaterial(n);const i=new c.KeyProvider;i.random=a;try{i.setupDefaults()}catch(e){throw a.delete(),i.delete(),e}try{return this.generateKeyPair(i,s)}finally{a.delete(),i.delete()}}importPrivateKey(e){const t=x_(),_=r(e,"base64"),s=t.importPrivateKey(_),n=s.extractPublicKey();try{const e=t.exportPublicKey(n),_=this.calculateKeyPairIdentifier(e);return new R_(_,s)}finally{n.delete()}}exportPrivateKey(e){D_(e);const t=x_().exportPrivateKey(e.lowLevelPrivateKey);return _(t)}importPublicKey(e){const t=r(e,"base64"),_=x_().importPublicKey(t),s=this.calculateKeyPairIdentifier(t);return new z_(s,_)}exportPublicKey(e){U_(e);const t=x_().exportPublicKey(e.lowLevelPublicKey);return _(t)}encrypt(e,_,s){const n=r(e,"utf8"),c=W_(_);M_(c);const a=N_(),i=g_(),o=new a.RecipientCipher,l=new a.Aes256Gcm;let f,d;o.encryptionCipher=l,o.random=i,s&&(f=new a.RandomPadding,f.random=i,o.encryptionPadding=f,d=a.PaddingParams.newWithConstraints(L_,L_),o.paddingParams=d),c.forEach((({identifier:e},t)=>{o.addKeyRecipient(e,c[t].lowLevelPublicKey)}));try{o.startEncryption();const e=o.packMessageInfo(),_=o.processEncryption(n),r=o.finishEncryption();return t.concat([e,_,r])}finally{l.delete(),d&&d.delete(),f&&f.delete(),o.delete()}}decrypt(e,_){const s=r(e,"base64");D_(_);const n=N_(),c=new n.RecipientCipher;c.random=g_();const a=n.PaddingParams.newWithConstraints(L_,L_);c.paddingParams=a;try{c.startDecryptionWithKey(_.identifier,_.lowLevelPrivateKey,new Uint8Array);const e=c.processDecryption(s),r=c.finishDecryption();return t.concat([e,r])}finally{a.delete(),c.delete()}}calculateHash(e,t=C_.SHA512){const s=r(e,"utf8");let n;switch(t){case C_.SHA224:n=this.createHash(s,N_().Sha224);break;case C_.SHA256:n=this.createHash(s,N_().Sha256);break;case C_.SHA384:n=this.createHash(s,N_().Sha384);break;case C_.SHA512:n=this.createHash(s,N_().Sha512);break;default:throw new TypeError("Unknown hash algorithm")}return _(n)}extractPublicKey(e){D_(e);const t=e.lowLevelPrivateKey.extractPublicKey();return new z_(e.identifier,t)}calculateSignature(e,t){const s=r(e,"utf8");D_(t);const n=N_(),c=new n.Signer,a=new n.Sha512;c.random=g_(),c.hash=a,c.reset(),c.appendData(s);try{const e=c.sign(t.lowLevelPrivateKey);return _(e)}finally{c.delete(),a.delete()}}verifySignature(e,t,_){const s=r(e,"utf8"),n=r(t,"base64");U_(_);const c=new(N_().Verifier);try{c.reset(n)}catch(e){throw c.delete(),e}c.appendData(s);const a=c.verify(_.lowLevelPublicKey);return c.delete(),a}signAndEncrypt(e,_,s,n){const c=r(e,"utf8");D_(_);const a=W_(s);M_(a);const{messageInfo:i,processEncryption:o,finishEncryption:l,messageInfoFooter:f}=this._signAndEncrypt(c,_,a,n);return t.concat([i,o,l,f])}signThenEncrypt(e,_,s,n){const c=r(e,"utf8");D_(_);const a=W_(s);M_(a);const{messageInfo:i,processEncryption:o,finishEncryption:l}=this._signThenEncrypt(c,_,a,n);return t.concat([i,o,l])}decryptAndVerify(e,t,_){const s=r(e,"base64");D_(t);const n=W_(_);return M_(n),this._decryptAndVerify(s,new Uint8Array,t,n)}decryptThenVerify(e,t,_){const s=r(e,"base64");D_(t);const n=W_(_);return M_(n),this._decryptThenVerify(s,new Uint8Array,t,n)}getRandomBytes(e){!function(e){if("number"!=typeof e)throw new TypeError("An argument is not a number.");if(e<=0)throw new TypeError(`An argument should be greater that '0', but received '${e}'.`)}(e);const t=g_().random(e);return _(t)}signThenEncryptDetached(e,s,n,c){const a=r(e,"utf8");D_(s);const i=W_(n);M_(i);const{messageInfo:o,processEncryption:l,finishEncryption:f}=this._signThenEncrypt(a,s,i,c);return{encryptedData:t.concat([l,f]),metadata:_(o)}}decryptThenVerifyDetached(e,t,_,s){const n=r(e,"base64"),c=r(t,"base64");D_(_);const a=W_(s);return M_(a),this._decryptThenVerify(n,c,_,a)}createStreamCipher(e,t){return new q_(e,t)}createStreamDecipher(e){return new Z_(e)}createStreamSignAndEncrypt(e,t,_){return new J_(e,t,_)}createStreamDecryptAndVerify(){return new $_}createStreamSigner(){return new Q_}createStreamVerifier(e){return new er(e)}generateGroupSession(e){const t=r(e,"utf8");B_(t);const _=function(e){const t=new(N_().GroupSessionTicket);t.rng=g_();try{return t.setupTicketAsNew(e),t.getTicketMessage()}finally{t.delete()}}(G_(t)),s=_.serialize();return _.delete(),V_([s])}importGroupSession(e){if(!Array.isArray(e))throw new TypeError("Epoch messages must be an array.");if(0===e.length)throw new TypeError("Epoch messages must not be empty.");return V_(e.map((e=>r(e,"base64"))))}calculateGroupSessionId(e){const t=r(e,"utf8");return B_(t),_(G_(t)).toString("hex")}createHash(e,t){const _=new t,r=_.hash(e);return _.delete(),r}calculateKeyPairIdentifier(e){return this.useSha256Identifiers?this.createHash(e,N_().Sha256):this.createHash(e,N_().Sha512).slice(0,8)}generateKeyPair(e,t){let _;if((r=t.type)===T_.CURVE25519_ROUND5_ED25519_FALCON||r===T_.CURVE25519_ED25519){const[r,s]=t.cipherAlgIds,[n,c]=t.signerAlgIds;_=e.generateCompoundHybridPrivateKey(r,s,n,c)}else(e=>e===T_.RSA_2048||e===T_.RSA_3072||e===T_.RSA_4096||e===T_.RSA_8192)(t.type)&&e.setRsaParams(t.bitlen),_=e.generatePrivateKey(t.algId);var r;const s=_.extractPublicKey();let n;try{n=e.exportPublicKey(s)}catch(e){throw _.delete(),s.delete(),e}const c=this.calculateKeyPairIdentifier(n);return{privateKey:new R_(c,_),publicKey:new z_(c,s)}}_signAndEncrypt(e,t,_,r){const s=N_(),n=g_(),c=new s.RecipientCipher,a=new s.Aes256Gcm,i=new s.Sha512;let o,l;c.encryptionCipher=a,c.random=n,c.signerHash=i,r&&(o=new s.RandomPadding,o.random=n,c.encryptionPadding=o,l=s.PaddingParams.newWithConstraints(L_,L_),c.paddingParams=l),_.forEach((({identifier:e},t)=>{c.addKeyRecipient(e,_[t].lowLevelPublicKey)}));try{c.addSigner(t.identifier,t.lowLevelPrivateKey),c.startSignedEncryption(e.length);const _=c.packMessageInfo(),r=c.processEncryption(e),s=c.finishEncryption();return{messageInfo:_,processEncryption:r,finishEncryption:s,messageInfoFooter:c.packMessageInfoFooter()}}finally{i.delete(),a.delete(),o&&o.delete(),l&&l.delete(),c.delete()}}_signThenEncrypt(e,t,_,r){const s=N_(),n=g_(),c=new s.RecipientCipher,a=new s.Aes256Gcm;let i,o;c.encryptionCipher=a,c.random=n,r&&(i=new s.RandomPadding,i.random=n,c.encryptionPadding=i,o=s.PaddingParams.newWithConstraints(L_,L_),c.paddingParams=o),_.forEach((({identifier:e},t)=>{c.addKeyRecipient(e,_[t].lowLevelPublicKey)}));const l=c.customParams();try{const _=this.calculateSignature(e,t);l.addData(K_,_),l.addData(S_,t.identifier),c.startEncryption();const r=c.packMessageInfo(),s=c.processEncryption(e);return{messageInfo:r,processEncryption:s,finishEncryption:c.finishEncryption()}}finally{l.delete(),a.delete(),i&&i.delete(),o&&o.delete(),c.delete()}}_decryptAndVerify(e,_,r,s){const n=N_(),c=n.PaddingParams.newWithConstraints(L_,L_),a=new n.RecipientCipher;let i;a.random=g_(),a.paddingParams=c;try{a.startDecryptionWithKey(r.identifier,r.lowLevelPrivateKey,_);const s=a.processDecryption(e),n=a.finishDecryption();i=t.concat([s,n])}catch(e){throw c.delete(),a.delete(),e}if(!a.isDataSigned())throw c.delete(),a.delete(),new j_(X_.DATA_NOT_SIGNED);const o=a.signerInfos();if(!o.hasItem())throw c.delete(),o.delete(),a.delete(),new j_(X_.DATA_NOT_SIGNED);const l=o.item();let f;for(let e=0;e<s.length;e+=1){if(0===t.compare(l.signerId(),s[e].identifier)){f=s[e];break}if(e===s.length-1)throw c.delete(),l.delete(),o.delete(),a.delete(),new j_(X_.SIGNER_NOT_FOUND)}if(!a.verifySignerInfo(l,f.lowLevelPublicKey))throw c.delete(),l.delete(),o.delete(),a.delete(),new j_(X_.INVALID_SIGNATURE);return c.delete(),l.delete(),o.delete(),a.delete(),i}_decryptThenVerify(e,_,r,s){const n=N_(),c=n.PaddingParams.newWithConstraints(L_,L_),a=new n.RecipientCipher;let i;a.random=g_(),a.paddingParams=c;try{a.startDecryptionWithKey(r.identifier,r.lowLevelPrivateKey,_);const s=a.processDecryption(e),n=a.finishDecryption();i=t.concat([s,n])}catch(e){throw c.delete(),a.delete(),e}const o=a.customParams();let l;if(1===s.length)l=s[0];else{let e;try{e=o.findData(S_)}catch(e){throw c.delete(),a.delete(),o.delete(),e}for(let _=0;_<s.length;_+=1)if(0===t.compare(e,s[_].identifier)){l=s[_];break}if(!l)throw o.delete(),c.delete(),a.delete(),new j_(X_.SIGNER_NOT_FOUND)}try{const e=o.findData(K_);if(!this.verifySignature(i,e,l))throw new j_(X_.INVALID_SIGNATURE);return i}finally{o.delete(),c.delete(),a.delete()}}}export{C_ as HashAlgorithm,T_ as KeyPairType,tr as VirgilCrypto,j_ as VirgilCryptoError,X_ as VirgilCryptoErrorStatus,R_ as VirgilPrivateKey,z_ as VirgilPublicKey,q_ as VirgilStreamCipher,Z_ as VirgilStreamDecipher,Q_ as VirgilStreamSigner,er as VirgilStreamVerifier,N_ as getFoundationModules,b_ as hasFoundationModules,A_ as initCrypto,E_ as moduleInitializer,I_ as setFoundationModules};