Lianja
Lianja
Convert DSA Public Key DER to PEM
See more DSA Examples
Converts a DSA public key from DER format to PEM.Chilkat Lianja Downloads
llSuccess = .F.
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loDsa = createobject("CkDsa")
// Load a DER public key.
llSuccess = loDsa.FromPublicDerFile("dsa_pub.der")
if (llSuccess <> .T.) then
? loDsa.LastErrorText
release loDsa
return
endif
// Save the public key to PEM:
lcPemStr = loDsa.ToPublicPem()
llSuccess = loDsa.SaveText(lcPemStr,"dsa_pub.pem")
if (llSuccess <> .T.) then
? loDsa.LastErrorText
release loDsa
return
endif
? "Finished!"
release loDsa