Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
  1. #16
    wtfiwantthatname's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Posts
    260
    Reputation
    10
    Thanks
    39
    My Mood
    Bored
    The Only Problem with your code is you forgot to specify an IV for the encryption algo.
    I just through this together you can use it if you want. I have to Add Encryption and Decryption for Files using crypto streams and such.
    Code:
    Imports System.Security.Cryptography
    Module Encryption
        Public Function AESEncrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim AES As AesCryptoServiceProvider
            With AES
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim AESEncryptor As ICryptoTransform = AES.CreateEncryptor
            Dim DataBuffer As Byte()
            Dim EncryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            EncryptedData = AESEncryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return EncryptedData
        End Function
    
        Public Function AESDecrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim AES As AesCryptoServiceProvider
            With AES
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim AESDecryptor As ICryptoTransform = AES.CreateDecryptor
            Dim DataBuffer As Byte()
            Dim DecryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            DecryptedData = AESDecryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return DecryptedData
        End Function
    
        Public Function RC2Encrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim RC2 As RC2CryptoServiceProvider
            With RC2
                .Mode = CipherMode.ECB
                .UseSalt = True
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim RC2Encryptor As ICryptoTransform = RC2.CreateEncryptor
            Dim DataBuffer As Byte()
            Dim EncryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            EncryptedData = RC2Encryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return EncryptedData
        End Function
    
        Public Function RC2Decrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim RC2 As RC2CryptoServiceProvider
            With RC2
                .Mode = CipherMode.ECB
                .UseSalt = True
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim RC2Decryptor As ICryptoTransform = RC2.CreateDecryptor
            Dim DataBuffer As Byte()
            Dim DecryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            DecryptedData = RC2Decryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return DecryptedData
        End Function
    
        Public Function DESEncrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim DES As DESCryptoServiceProvider
            With DES
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim DESEncryptor As ICryptoTransform = DES.CreateEncryptor
            Dim DataBuffer As Byte()
            Dim EncryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            EncryptedData = DESEncryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return EncryptedData
        End Function
    
        Public Function DESDecrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim DES As DESCryptoServiceProvider
            With DES
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim DESDecryptor As ICryptoTransform = DES.CreateDecryptor
            Dim Databuffer As Byte()
            Dim DecryptedData As Byte()
            Databuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            DecryptedData = DESDecryptor.TransformFinalBlock(Databuffer, 0, Databuffer.Length)
            Return DecryptedData
        End Function
    
        Public Function TripleDESEncrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim TripleDes As TripleDESCryptoServiceProvider
            With TripleDes
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim TripleDESEncryptor As ICryptoTransform = TripleDes.CreateEncryptor
            Dim Databuffer As Byte()
            Dim EncryptedData As Byte()
            Databuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            EncryptedData = TripleDESEncryptor.TransformFinalBlock(Databuffer, 0, Databuffer.Length)
            Return EncryptedData
        End Function
    
        Public Function TripleDESDecrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim TripleDes As TripleDESCryptoServiceProvider
            With TripleDes
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim TripleDESDecryptor As ICryptoTransform = TripleDes.CreateDecryptor
            Dim DataBuffer As Byte()
            Dim DecryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            DecryptedData = TripleDESDecryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return DecryptedData
        End Function
    
        
        Public Function ToBase64String(ByVal Bytes As Byte()) As String
            Return Convert.ToBase64String(Bytes)
        End Function
    End Module
    "I don't believe in an afterlife, so I don't have to spend my whole life fearing hell, or fearing heaven even more. For whatever the tortures of hell, I think the boredom of heaven would be even worse." - Isaac Asimov

  2. #17
    wtfiwantthatname's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Posts
    260
    Reputation
    10
    Thanks
    39
    My Mood
    Bored
    The Only Problem with your code is you forgot to specify an IV for the encryption algo.
    I just through this together you can use it if you want. I have to Add Encryption and Decryption for Files using crypto streams and such.
    Code:
    Imports System.Security.Cryptography
    Module Encryption
        Public Function AESEncrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim AES As AesCryptoServiceProvider
            With AES
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim AESEncryptor As ICryptoTransform = AES.CreateEncryptor
            Dim DataBuffer As Byte()
            Dim EncryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            EncryptedData = AESEncryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return EncryptedData
        End Function
    
        Public Function AESDecrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim AES As AesCryptoServiceProvider
            With AES
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim AESDecryptor As ICryptoTransform = AES.CreateDecryptor
            Dim DataBuffer As Byte()
            Dim DecryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            DecryptedData = AESDecryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return DecryptedData
        End Function
    
        Public Function RC2Encrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim RC2 As RC2CryptoServiceProvider
            With RC2
                .Mode = CipherMode.ECB
                .UseSalt = True
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim RC2Encryptor As ICryptoTransform = RC2.CreateEncryptor
            Dim DataBuffer As Byte()
            Dim EncryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            EncryptedData = RC2Encryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return EncryptedData
        End Function
    
        Public Function RC2Decrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim RC2 As RC2CryptoServiceProvider
            With RC2
                .Mode = CipherMode.ECB
                .UseSalt = True
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim RC2Decryptor As ICryptoTransform = RC2.CreateDecryptor
            Dim DataBuffer As Byte()
            Dim DecryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            DecryptedData = RC2Decryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return DecryptedData
        End Function
    
        Public Function DESEncrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim DES As DESCryptoServiceProvider
            With DES
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim DESEncryptor As ICryptoTransform = DES.CreateEncryptor
            Dim DataBuffer As Byte()
            Dim EncryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            EncryptedData = DESEncryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return EncryptedData
        End Function
    
        Public Function DESDecrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim DES As DESCryptoServiceProvider
            With DES
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim DESDecryptor As ICryptoTransform = DES.CreateDecryptor
            Dim Databuffer As Byte()
            Dim DecryptedData As Byte()
            Databuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            DecryptedData = DESDecryptor.TransformFinalBlock(Databuffer, 0, Databuffer.Length)
            Return DecryptedData
        End Function
    
        Public Function TripleDESEncrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim TripleDes As TripleDESCryptoServiceProvider
            With TripleDes
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim TripleDESEncryptor As ICryptoTransform = TripleDes.CreateEncryptor
            Dim Databuffer As Byte()
            Dim EncryptedData As Byte()
            Databuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            EncryptedData = TripleDESEncryptor.TransformFinalBlock(Databuffer, 0, Databuffer.Length)
            Return EncryptedData
        End Function
    
        Public Function TripleDESDecrypt(ByVal Key As String, ByVal Data As String) As Byte()
            On Error Resume Next
            Dim TripleDes As TripleDESCryptoServiceProvider
            With TripleDes
                .Mode = CipherMode.ECB
                .Key = System.Text.ASCIIEncoding.ASCII.GetBytes(Key)
                .IV = .Key
            End With
            Dim TripleDESDecryptor As ICryptoTransform = TripleDes.CreateDecryptor
            Dim DataBuffer As Byte()
            Dim DecryptedData As Byte()
            DataBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(Data)
            DecryptedData = TripleDESDecryptor.TransformFinalBlock(DataBuffer, 0, DataBuffer.Length)
            Return DecryptedData
        End Function
    
        
        Public Function ToBase64String(ByVal Bytes As Byte()) As String
            Return Convert.ToBase64String(Bytes)
        End Function
    End Module
    "I don't believe in an afterlife, so I don't have to spend my whole life fearing hell, or fearing heaven even more. For whatever the tortures of hell, I think the boredom of heaven would be even worse." - Isaac Asimov

  3. #18
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Yah but thats a complex code to a beginner, i just wanted to make a simple one for the beginner, i doubt a beginner would understand that code

  4. #19
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Bombs doesn't copy and paste, I know that as a fact. He makes combat arms multitools and doesn't afraid of anything.

  5. #20
    Calebb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    212
    Reputation
    12
    Thanks
    75
    I taught bombs everything he knows. :/ Lol. Where ya been man? Haven't seen you on MSN.

  6. #21
    mnpeep's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    220
    Reputation
    12
    Thanks
    10
    My Mood
    Amazed
    awesome TUT. congrats ur on my respected list.

  7. #22
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Quote Originally Posted by Calebb View Post
    I taught bombs everything he knows. :/ Lol. Where ya been man? Haven't seen you on MSN.
    i just got back from vacation, i was on msn all day yesterday tho
    Quote Originally Posted by mnpeep View Post
    awesome TUT. congrats ur on my respected list.
    thanks bro

  8. #23
    mnpeep's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    220
    Reputation
    12
    Thanks
    10
    My Mood
    Amazed
    Quote Originally Posted by bombsaway707
    thanks bro
    ya welcome, also i changed my sig so you can see it now.

  9. #24
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Quote Originally Posted by mnpeep View Post
    ya welcome, also i changed my sig so you can see it now.
    haha nice, your the first person to put me in their respect list

  10. #25
    RawVb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    SoFLa
    Posts
    81
    Reputation
    10
    Thanks
    6
    Quote Originally Posted by hejsan1 View Post
    Yeah almost
    Hejsan's jealous

  11. #26
    RawVb's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    SoFLa
    Posts
    81
    Reputation
    10
    Thanks
    6
    Great Encrpyter dude i just sent it to like six kids . It is great.

  12. #27
    deathninjak0's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    1,510
    Reputation
    12
    Thanks
    294
    My Mood
    Cool
    Whats a Encrypter?

  13. #28
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Quote Originally Posted by deathninjak0 View Post
    Whats a Encrypter?
    ............................................______ __
    ....................................,.-‘”...................``~.,
    .............................,.-”...................................“-.,
    .........................,/...............................................”:,
    .....................,?........................... ...........................\,
    .................../.................................................. .........,}
    ................./.................................................. ....,:`^`..}
    .............../.................................................. .,:”........./
    ..............?.....__............................ .............:`.........../
    ............./__.(.....“~-,_..............................,:`........../
    .........../(_....”~,_........“~,_....................,:`..... ..._/
    ..........{.._$;_......”=,_.......“-,_.......,.-~-,},.~”;/....}
    ...........((.....*~_.......”=-._......“;,,./`..../”............../
    ...,,,___.\`~,......“~.,....................`..... }............../
    ............(....`=-,,.......`........................(......;_,,-”
    ............/.`~,......`-...............................\....../\
    .............\`~.*-,.....................................|,./.....\,__
    ,,_..........}.>-._\...................................|........... ...`=~-,
    .....`=~-,_\_......`\,.................................\
    ...................`=~-,,.\,...............................\
    ................................`:,,.............. .............`\..............__
    .....................................`=-,...................,%`>--==``
    ........................................_\........ ..._,-%.......`\
    ...................................,<`.._|_,-&``................`\

  14. #29
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Quote Originally Posted by RawVb View Post
    Great Encrpyter dude i just sent it to like six kids . It is great.
    thanks man

  15. #30
    deathninjak0's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    1,510
    Reputation
    12
    Thanks
    294
    My Mood
    Cool
    Quote Originally Posted by lolland View Post
    ............................................______ __
    ....................................,.-‘”...................``~.,
    .............................,.-”...................................“-.,
    .........................,/...............................................”:,
    .....................,?........................... ...........................\,
    .................../.................................................. .........,}
    ................./.................................................. ....,:`^`..}
    .............../.................................................. .,:”........./
    ..............?.....__............................ .............:`.........../
    ............./__.(.....“~-,_..............................,:`........../
    .........../(_....”~,_........“~,_....................,:`..... ..._/
    ..........{.._$;_......”=,_.......“-,_.......,.-~-,},.~”;/....}
    ...........((.....*~_.......”=-._......“;,,./`..../”............../
    ...,,,___.\`~,......“~.,....................`..... }............../
    ............(....`=-,,.......`........................(......;_,,-”
    ............/.`~,......`-...............................\....../\
    .............\`~.*-,.....................................|,./.....\,__
    ,,_..........}.>-._\...................................|........... ...`=~-,
    .....`=~-,_\_......`\,.................................\
    ...................`=~-,,.\,...............................\
    ................................`:,,.............. .............`\..............__
    .....................................`=-,...................,%`>--==``
    ........................................_\........ ..._,-%.......`\
    ...................................,<`.._|_,-&``................`\
    Shutup

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [TUT] Basic Skining with photoshop
    By No5cope in forum Combat Arms Mod Tutorials
    Replies: 36
    Last Post: 07-11-2010, 06:13 PM
  2. [TUT] Basic HTML
    By alexrules057 in forum Web Languages
    Replies: 21
    Last Post: 01-31-2010, 01:03 AM
  3. [Vid tut] Basic Game Hacking
    By Matrix_NEO006 in forum Programming Tutorials
    Replies: 5
    Last Post: 01-02-2010, 10:43 AM
  4. [TUT] Basic Cheat Engine tutorial for begginers
    By rawr161 in forum Programming Tutorials
    Replies: 2
    Last Post: 08-14-2009, 06:41 AM
  5. Basic Encryption
    By Calard in forum General Game Hacking
    Replies: 0
    Last Post: 02-23-2007, 06:32 AM

Tags for this Thread