Examples xml.CryptoKey usage examples. Loading an asymmetric RSA keyGenerating a symmetric AES256 keySetting a HMAC keyDeriving a HMAC keyComputing the shared secret with Diffie-HellmanLoad the Diffie-Hellman parameters from a PEM file, the other peer's public key from an XML file, and compute the shared secret.