Sample code for 30+ languages & platforms
AutoIt

RSA Import Public Key

See more RSA Examples

Shows how to select/import a public key for RSA encryption or signature verification.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oPubKey = ObjCreate("Chilkat.PublicKey")
; In all Chilkat methods expecting a path, you pass either absolute or relative paths.
$bSuccess = $oPubKey.LoadFromFile("rsaKeys/myTestRsaPublic.pem")
If ($bSuccess = False) Then
    ConsoleWrite($oPubKey.LastErrorText & @CRLF)
    Exit
EndIf

$oRsa = ObjCreate("Chilkat.Rsa")

; Tell RSA to use the public key.
$oRsa.UsePublicKey($oPubKey)