MOZMALINHA (08-08-2011)
OK, I'm not going into detail about it, but I'll give you the code, and how to use a simple encryption/decryption method.
then upgrade it to a MD5 hash method.
first of all, put these above your namespace.
(if you don't know where that is, sorry, stop reading, and do something else)
[highlight=vb.net]
Imports System.Text
Imports System.IO
Imports System.Security.Cryptography
Imports System.Collections.Specialized
[/highlight]
first method, reverse encrypt/decrypt.
[highlight=vb.net]
Public Function SimpleCrypt(ByVal Text As String) As String
' Encrypts/decrypts the passed string using
' a simple ASCII value-swapping algorithm
Dim strTempChar As String, i As Integer
strTempChar = ""
For i = 1 To Len(Text)
If Asc(Mid$(Text, i, 1)) < 128 Then
strTempChar = CType(Asc(Mid$(Text, i, 1)) + 128, String)
ElseIf Asc(Mid$(Text, i, 1)) > 128 Then
strTempChar = CType(Asc(Mid$(Text, i, 1)) - 128, String)
End If
Mid$(Text, i, 1) = Chr(CType(strTempChar, Integer))
Next i
Return Text
End Function
[/highlight]
simply, use it like:
[highlight=vb.net]
dim str as string = simplecrypt("string here")
[/highlight]
and to decrypt that message, use:
[highlight=vb.net]
msgbox(simplecrypt(str))
[/highlight]
now, if you want to use a heavy encryption, there are a few you can use,
but i tend to stick with a MD5 encryption.
people use what they want to, and this is just my personal one...well, modified of coarse for security reasons for my apps...
[highlight=vb.net]
Public Class DEScrypt
Private Shared DES As New TripleDESCryptoServiceProvider
Private Shared MD5 As New MD5CryptoServiceProvider
Public Shared Function MD5hash(ByVal value As String) As Byte()
Return MD5.ComputeHash(ASCIIEncoding.ASCII.GetBytes(value ))
End Function
Public Shared Function encrypt(ByVal strEncrypt As String, ByVal key As String) As String
DES.Key = DEScrypt.MD5hash(key)
DES.Mode = CipherMode.ECB
Dim Buffer As Byte() = ASCIIEncoding.ASCII.GetBytes(strEncrypt)
Return Convert.ToBase64String(DES.CreateEncryptor().Trans formFinalBlock(Buffer, 0, Buffer.Length))
End Function
Public Shared Function decrypt(ByVal strdecrypt As String, ByVal key As String) As String
Try
DES.Key = DEScrypt.MD5hash(key)
DES.Mode = CipherMode.ECB
Dim Buffer As Byte() = Convert.FromBase64String(strdecrypt)
Return ASCIIEncoding.ASCII.GetString(DES.CreateDecryptor( ).TransformFinalBlock(Buffer, 0, Buffer.Length))
Catch ex As Exception
MsgBox("error, wrong key")
Return ""
End Try
End Function
End Class
[/highlight]
now, to use this one, its much the same, except there is a decrypt function and an encrypt function.
where it says key, that is the encryption/decryption key. it must be the same as the one you used to encrypt if your going to decrypt the encrypted string. or, it will error.
encrypt :
[highlight=vb.net]
dim encoded as string = encrypt("string here", "key")
[/highlight]
and decrypt:
[highlight=vb.net]
dim unencoded as string = decrypt(encoded, "key")
[/highlight]
that's about it, so...until I'm bored again, see ya's ^.^
Last edited by sythe179; 08-08-2011 at 04:13 AM.
Live Music Stream
Learning VB.net as a passtime...
[IMG]https://i10.photobucke*****m/albums/a144/RedX_Patronus/pbuser.png[/IMG]|
|
c++
Anti-afk---templates---MW2 unlocker public form---Vent flooder Skin
VB
(LoL multipatch)---PBrowser---(Minecopy)
(MW2 Unlocker)
MOZMALINHA (08-08-2011)
LOL
I stopped reading because even that line was wrong. You do NOT put import statements within a namespace.Originally Posted by *****179
Why are you using VB6 functions for this..?
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
ok...better?...
Live Music Stream
Learning VB.net as a passtime...
[IMG]https://i10.photobucke*****m/albums/a144/RedX_Patronus/pbuser.png[/IMG]|
|
c++
Anti-afk---templates---MW2 unlocker public form---Vent flooder Skin
VB
(LoL multipatch)---PBrowser---(Minecopy)
(MW2 Unlocker)
What xD namespace area? lol, i learned VB and i never, never heard about namespace are, namespacearea is in C++ but not in VB ,.. its the Import Area but the rest is okay
thank u man ...i apprecitate this ...and also the other pplz wich corrected ..THANK YOU
_______________
yeah man but .....
IF U LOVE ,U WILL NOT BE LOVED BACK
IF U STEAL ,at least u got somethin to eat
IF U KILL THEN U WILL PROBABLY GET KILLED
I LOVE MEDINA !