AutoIt
AutoIt
RSA Import Private Key
See more RSA Examples
Shows how to select/import a private key for RSA signing or decryption.Chilkat AutoIt Downloads
Local $bSuccess = False
$oPrivKey = ObjCreate("Chilkat.PrivateKey")
Local $sPassword = "secret"
; In all Chilkat methods expecting a path, you pass either absolute or relative paths.
$bSuccess = $oPrivKey.LoadAnyFormatFile("rsaKeys/myTestRsaPrivate.pem",$sPassword)
If ($bSuccess = False) Then
ConsoleWrite($oPrivKey.LastErrorText & @CRLF)
Exit
EndIf
$oRsa = ObjCreate("Chilkat.Rsa")
; Tell the RSA object to use the private key (i.e. import the private key)
$oRsa.UsePrivateKey($oPrivKey)