Xojo Plugin
Xojo Plugin
Convert DSA Public Key DER to PEM
See more DSA Examples
Converts a DSA public key from DER format to PEM.Chilkat Xojo Plugin Downloads
Dim success As Boolean
success = False
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Dim dsa As New Chilkat.Dsa
// Load a DER public key.
success = dsa.FromPublicDerFile("dsa_pub.der")
If (success <> True) Then
System.DebugLog(dsa.LastErrorText)
Return
End If
Dim pemStr As String
// Save the public key to PEM:
pemStr = dsa.ToPublicPem()
success = dsa.SaveText(pemStr,"dsa_pub.pem")
If (success <> True) Then
System.DebugLog(dsa.LastErrorText)
Return
End If
System.DebugLog("Finished!")