Classic ASP
Classic ASP
RSA Import Public Key
See more RSA Examples
Shows how to select/import a public key for RSA encryption or signature verification.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
set pubKey = Server.CreateObject("Chilkat.PublicKey")
' In all Chilkat methods expecting a path, you pass either absolute or relative paths.
success = pubKey.LoadFromFile("rsaKeys/myTestRsaPublic.pem")
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( pubKey.LastErrorText) & "</pre>"
Response.End
End If
set rsa = Server.CreateObject("Chilkat.Rsa")
' Tell RSA to use the public key.
success = rsa.UsePublicKey(pubKey)
%>
</body>
</html>