VB.NET
VB.NET
RSA Import Public Key
See more RSA Examples
Shows how to select/import a public key for RSA encryption or signature verification.Chilkat VB.NET Downloads
Dim success As Boolean = False
Dim pubKey As New Chilkat.PublicKey
' In all Chilkat methods expecting a path, you pass either absolute or relative paths.
success = pubKey.LoadFromFile("rsaKeys/myTestRsaPublic.pem")
If (success = False) Then
Debug.WriteLine(pubKey.LastErrorText)
Exit Sub
End If
Dim rsa As New Chilkat.Rsa
' Tell RSA to use the public key.
rsa.UsePublicKey(pubKey)