Visual Basic 6.0
Visual Basic 6.0
Duplicate openssl pkey -in private.pem -pubout -out pubkey.pem
See more OpenSSL Examples
How to output the public part of a private key: Demonstrates how to duplicate this OpenSSL command:openssl pkey -in private.pem -pubout -out pubkey.pem
Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim pkey As New PrivateKey
' Load the private key from an PEM file:
success = pkey.LoadPemFile("private.pem")
If (success = 0) Then
Debug.Print pkey.LastErrorText
Exit Sub
End If
Dim pubKey As New PublicKey
success = pkey.ToPublicKey(pubKey)
success = pubKey.SavePemFile(0,"pubKey.pem")
If (success <> 1) Then
Debug.Print pubKey.LastErrorText
Exit Sub
End If
Debug.Print "Success."