Examples xml.CryptoKey usage examples. Loading an asymmetric RSA keyIn this example, RSA keys are loaded from PEM files. Code samples show how to load the key file from the PEM file or from FGLPROFILE entries.Encrypting with an RSA key (xml.Encryption.RSAEncrypt)When encrypting data with an RSA key, this example shows how to use a PEM key file or a key referenced from FGLPROFILE entries to perform the encryption.Decrypting with an RSA key (xml.Encryption.RSADecrypt)When decrypting data with an RSA key, this example shows how to use a PEM key file or a key referenced from FGLPROFILE entries to perform the decryption.Generating a symmetric AES256 keyThis example demonstrates how to generate a symmetric AES256 key using the xml.CryptoKey class. It shows key creation, generation, and displays key properties such as size, type, and usage.Setting a HMAC key This example demonstrates how to create and set an HMAC key using the xml.CryptoKey class. It shows key initialization, setting the key value, and retrieving key properties such as size, type, and usage. Deriving a HMAC key This example demonstrates how to derive an HMAC key using the xml.CryptoKey class. It shows generating a random seed, setting a base password, and deriving a key suitable for encryption or signature functions. Computing the shared secret with Diffie-HellmanIn this example, Diffie-Hellman parameters are loaded from a PEM file and the peer's public key is loaded from an XML file. A private key is generated, and the shared secret is computed for secure communication.Create an ECDSA public key from coordinates