How to use a public key file in VB? (General questions)
Hi,
I am having a public key file. Can any one help me, how to generate a private key using this and use the same for uploading a file in Visual Basic, with the help of wodHttpDLX activeX control.
Thanks in Advance
SUGI
Re: How to use a public key file in VB?
Hi Sugi,
Actually you can generate only public key from private key. You cannot do opposite. Private key is master key and public key is key extracted from private key for public use.
However maybe you have private key and you need to extract your public key from it.
Here is example how to receive public key from your private key:
[code]Dim key As New Keys
key.Load c:\private.txt , kay_password
'public key in X509 PEM format
key.PublicKeySave RSAkey, c:\RSApublic.txt
'public key in OpenSSH format
Debug.Print key.PublicKeyOpenSSH(RSAkey)[/code]
and you can find here example how to generate and save private and public key using wodKeys:
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=54
Let us know how it goes.
Regards,
Drazen