Sample code for 30+ languages & platforms
AutoIt

Convert DSA Public Key DER to PEM

See more DSA Examples

Converts a DSA public key from DER format to PEM.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oDsa = ObjCreate("Chilkat.Dsa")

; Load a DER public key.
$bSuccess = $oDsa.FromPublicDerFile("dsa_pub.der")
If ($bSuccess <> True) Then
    ConsoleWrite($oDsa.LastErrorText & @CRLF)
    Exit
EndIf

Local $sPemStr

; Save the public key to PEM:
$sPemStr = $oDsa.ToPublicPem()
$bSuccess = $oDsa.SaveText($sPemStr,"dsa_pub.pem")
If ($bSuccess <> True) Then
    ConsoleWrite($oDsa.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite("Finished!" & @CRLF)