[VB6 equivalent: RSA_FromXMLString]
Dim strInternalKey As String
Dim strXML As String
Dim nRet As Integer
strXML = "<RSAKeyValue>" _
& "<Modulus>CmZ5HcaYgWjeerd0Gbt/sMABxicQJwB1FClC4ZqNjFH" _
& "QU7PjeCod5dxa9OvplGgXARSh3+Z83Jqa9V1lViC7qw==</Modulus>" _
& "<Exponent>AQAB</Exponent>" _
& "</RSAKeyValue>"
strInternalKey = Rsa.FromXMLString(strXML, False)
If strInternalKey.Length = 0 Then
Console.WriteLine("Error: ")
Exit Sub
End If
Console.WriteLine("INTKEY=" & strInternalKey)
nRet = Rsa.CheckKey(strInternalKey)
Console.WriteLine("RSA_CheckKey returns " & nRet)
See Also:
Rsa.FromXMLString Method (String)
Rsa.FromXMLString Method (String, Boolean)
Rsa.FromXMLString Method (String, Rsa.XmlOptions)