Something like the following should work:
$set ilusing"System.Xml" $set ilusing"System.Security.Cryptography" $set ilusing"System.Security.Cryptography.Xml" class-id vbdecrypt.Class1. working-storage section. method-id Decrypt. local-storage section. procedure division using by value Doc as type XmlDocument by value Alg as type RSA by value KeyName as string. *> Check the arguments. If KeyName = "" Raise New ArgumentNullException("KeyName") End-If *> Create a new EncryptedXml object. declare exml as type EncryptedXml = new EncryptedXml(Doc) *> Add a key-name mapping. *> This method can only decrypt documents *> that present the specified key name. invoke exml::AddKeyNameMapping(KeyName, Alg) *> Decrypt the element. invoke exml::DecryptDocument goback. end method. end class.