Results 1 to 1 of 1

Thread: Getting Bytes from Class

  1. #1
    New Member
    Join Date
    Aug 12
    Posts
    1

    Getting Bytes from Class

    ello,

    I am currently making a Login System. But I wanted this option to be there that it checks for the bytes to be the same on runtime. (For potential crackers)

    I tried a lot but I don't seem to find the problem.

    This is just a small example code:

    Public Shared Function ByteEqual
    Dim first1 As Byte() = System.Text.Encoding.Default.GetBytes(My.Resources.LoginSystem)
    Dim second1 As Byte() = System.Text.Encoding.Default.GetBytes(My.Resources.LoginSystem)

    If first1.Length = second1.Length Then
    MessageBox.Show("True")
    Else
    MessageBox.Show("False")
    End If

    End Function

    This is working but I want the "My.Resources.Loginsystem" to be a certain class in my project. Is this possible without injecting?

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 12
    Posts
    5,501

    Re: Getting Bytes from Class

    In what sense is it 'working'? At first glance it appears that first1 and second1 have the same source and will therefore always be identical. Also you've declared this as a function but it has neither input or return values. What actually is My.Resources.LogInSystem? How does the length being the same ensure there's been no crack?
    Last edited by dunfiddlin; Aug 18th, 2012 at 11:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •