Hello Everybody!
I need help converting this into PHP:
Public Function Encrypt(ByVal text As String) As String
Dim charSet1 As String, charSet2 As String, i As Long
Dim pos As Long, encryptedChar, encryptedText
charSet1 = " ?!@#$%^&*()_+|0123456789abcdefghijklmnopqrstuvwxyz.,-~ABCDEFGHIJKLMNOPQRSTUVWXYZ¿¡²³ÀÁÂÃÄÅÒÓÔÕÖÙÛÜàáâãäåض§Ú¥"
charSet2 = " ¿¡@#$%^&*()_+|01²³456789ÀbÁdÂÃghÄjklmÅÒÓqÔÕÖÙvwÛÜz.,-~AàáâãFGHäJKåMNضQR§TÚVWX¥Z?!23acefinoprstuxyBCDEILOPSUY"
For i = 1 To Len(text)
pos = InStr(charSet1, Mid(text, i, 1))
If pos > 0 Then
encryptedChar = Mid(charSet2, pos, 1)
encryptedText = encryptedText + encryptedChar
Else
encryptedText = encryptedText + Mid(text, i, 1)
End If
Next
Encrypt = encryptedText
End Function
FROM VISUAL BASIC TO PHP...
I'm making a text to hash thing like presented above but in PHP for my website.. The code above is home-made so its nothing like MD5 or SHA1. But if you guys do know a way to encrypt and decrypt MD5 in Visual basic 2008 please show me! (this must also work for PHP). I need this right away for a project being done. So please help me :(!!
THanks,
Kevin