Sample code for 30+ languages & platforms
Xojo Plugin

DSA Public Key PEM to DER Conversion

See more DSA Examples

Converts a DSA public key from PEM format to DER.

Chilkat Xojo Plugin Downloads

Xojo Plugin
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 PEM public key.
Dim pemPublicKey As String
pemPublicKey = dsa.LoadText("dsa_pub.pem")
// Import the public key PEM into the DSA object.
success = dsa.FromPublicPem(pemPublicKey)
If (success <> True) Then
    System.DebugLog(dsa.LastErrorText)
    Return
End If

// Write it out as a DER file:
success = dsa.ToPublicDerFile("dsa_pub.der")
If (success <> True) Then
    System.DebugLog(dsa.LastErrorText)
    Return
End If

System.DebugLog("Finished!")