View Full Version : VB Encryption
liquidchild
02-19-2002, 07:11 PM
I'm currently working on a instant messenging program in vb (quite easy i might add). My problem is that i need to encrypt the passwords for login names. I've basically finsished the while except for this, and it's not due for a while so i figured i make it really crazy encryption. If anyone has any source on 128 bit or more encryption for vb, please let me know.
One more thing what should i add to the server side of the program, i include a snapshot of the server prog. Thanks.
liquidchild
02-19-2002, 07:12 PM
oops, i did it twice
Sintax
02-27-2002, 06:29 AM
what .dll are you using winsock?
i have had problems coding anyhting that has to do with TCP/IP in VB.
liquidchild
02-27-2002, 10:28 PM
yea, im using winsock, and im not expieriencing any problems with it, and ive tested on all windows cept for win2k server.
Sintax
02-28-2002, 03:13 AM
were did you get a registered version of Winsock?
verifier
02-28-2002, 10:12 AM
comes with vb5 and higher.
verifier
02-28-2002, 10:12 AM
Encryption:
http://www.tlsecurity.net/Sourcecode/Vb/
JimCamel
03-10-2002, 06:29 AM
Does any one else have problems with using arrays of winsock? On my game (www.aeonlegend.com) which is written in VB, the server stops responding to requests (giving a "connection forcefully refused" error to any clients attempting to connect).
Any ideas?
Jim
verifier
03-10-2002, 09:09 AM
Originally posted by JimCamel
Does any one else have problems with using arrays of winsock? On my game (www.aeonlegend.com) which is written in VB, the server stops responding to requests (giving a "connection forcefully refused" error to any clients attempting to connect).
Any ideas?
Jim
You do it in the wrong way =)
1. Put i general declarations:
Dim strBuffer() As String
const MAX_SOCKETS = 10
2. Add two sockets to your form, name one to 'sckListen' and the other 'sckClient'
3. Change the index property of 'sckClient' to 0
Private Sub Form_Load()
Redim strBuffer(MAX_SOCKETS) 'Up to MAX_SOCKETS may connect to our server
sckListen.Port = 23 'Listen on port 23 (telnet)
sckListen.Listen 'Start to listen for connections
End Sub
Private Sub CompleteTrans(index As Integer, trans As String)
'Ok. This is were you should put your server logic, all complete transactios will trigger this sub
Debug.Print trans
End Sub
Private Sub sckListen_ConnectionRequest(ByVal requestID As Long)
Dim iCounter As Integer
'Check if we have a free loaded socket
For iCounter = 0 To sckClient.UBound
'Yes, we have one, use it
If sckClient(iCounter).State = sckClosed Then
'Accept a new connection, and exit this sub
strBuffer(iCounter) = ""
sckClient(iCounter).Accept requestID
Exit Sub
End If
Next
'Have we accepted a maximum number of connections? If we have, dont accept a new one
If sckClient.ubound = MAX_SOCKETS Then Exit Sub
'No we have not accepted maximum number of sockets, load a new one
Load sckClient(sckClient.UBound + 1)
sckClient(sckClient.UBound).Accept requestID
End Sub
Private Sub sckClient_Error(index As Integer, ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
sckClient(index).Close
End Sub
Private Sub sckClient_Close(index As Integer)
'If someone closed the connection, make sure that we close it too!
sckClient(index).Close
End Sub
Private Sub sckClient_DataArrival(index As Integer, ByVal bytesTotal As Long)
Dim strTmp As String
Dim iPos As Integer
'Append the temporary buffer with the new incomming data
sckClient(index).GetData strTmp
strBuffer(index) = strBuffer(index) & strTmp
'Check if we have a complete transaction (in this case our transactions end with CrLf)
iPos = InStr(1, strBuffer(index), vbCrLf)
If iPos <> 0 Then
'Extract the complete transaction and trigger the transaction event
CompleteTrans index, Left(strBuffer(index), iPos + 1)
strBuffer(index) = Mid(strBuffer(index), iPos + 2)
End If
End Sub
This little project gives you a complete serverengine. All you have to do is to put your login into CompleteTrans
JimCamel
03-12-2002, 01:52 AM
Um, there doesn't seem to be any difference between the code I wrote and yours, other than yours has a defined number of winsocks and mine just loads the next available one
Jim
xilica
05-18-2002, 04:19 PM
you can encrypt for a text box by going to the properties and typing a symbol for the passwords..
comrade
06-18-2002, 12:39 PM
Good idea is to use secure cryptographic hashes such as MD5 and SHA for passwords. It would practically be impossible to retrieve the original password, but you can still verify its correct.
Kamikaze!
07-07-2002, 09:00 AM
http://www.di-mgt.com.au/crypto.html
http://www.codetoad.com/visual_basic/security/
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.