Results 1 to 24 of 24

Thread: A=1 B=2 C=3

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715

    Wink

    Hi, I'm makin this password program and I'm going to use the following encryption:



    a = 1
    b = 2
    c = 3
    d = 4
    e = 5
    f = 6
    g = 7
    h = 8
    i = 9
    j = 1
    k = 2
    etc...

    Now I'm going to use that, or can PLEASE someone tell me how to make a password on a database.


    thanks in advance!!!

    NXSupport - Your one-stop source for computer help

  2. #2
    Fanatic Member Wen Lie's Avatar
    Join Date
    Jul 1999
    Location
    Singapore
    Posts
    524

    Wink

    Password on Database

    Well, assumming that you've already had your encryption formula...

    Just make a field on your table. Let's call it "Pwd" field.

    On your VB code, try this logic.

    - Get an input from user (using textbox with * as its password character).
    - Encrypt the input password.
    - Save it to your "Pwd" field.

    Easy right ???

    And don't forget to decrypt the password when you want to use is as user authentication...

    Regards,
    Wen Lie
    Regards,
    [-w-]

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    For the Encryption part, there are two good samples at my homepage
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Guest
    But if you're learning and you are a beginner, it is okay to experiment with different methods. I don't think any of us started out using something like RC4.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    Now lets say I make a database, is there a way to put a password on the database so that you need a password to open it.
    NXSupport - Your one-stop source for computer help

  6. #6
    Guest
    Yes, I think you can encrypt it using a method of binary encryption.

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    do you know how?
    NXSupport - Your one-stop source for computer help

  8. #8
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Dimiva this isn't that hard, have you downloaded my module?
    1. Make a new exe project
    2. add my module
    3. paste the code in the form window
    4. Add a textbox called text1 and a commandbutton called command 1
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    Ohhhhhh maybe that's why, I didn't download the module
    NXSupport - Your one-stop source for computer help

  10. #10
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    try this too if you want.


    make 4 textboxes and 2 command buttons


    just paste in all this code



    -------------

    'This goes in declarations section
    Dim Output

    ' end declarations


    Public Function Crypt(Text As String) As String
    Dim strTempChar As String
    Dim strTempChar2
    Dim Hash
    Dim Base
    Dim Base2
    Dim VariableBase
    Dim ASCIIbuffer
    Dim Yanom

    Dim x
    Dim y
    Dim z

    On Error Resume Next

    Base = Asc(Mid$(Text, 1, 1))
    Base2 = Asc(Mid$(Text, 2, 1))

    For i = 1 To Len(Text)


    If i = 1 Then
    VariableBase = Base
    End If

    If VariableBase = vbEmpty Then
    VariableBase = Base
    End If

    'If (Asc(Mid$(Text, i, 1))) = 255 Then
    'VariableBase = Asc(Mid$(Text, i, 1))
    'strTempChar = Asc(Mid$(Text, i, 1))
    'x = Chr(strTempChar)
    'z = x + x
    'GoTo 70
    'End If

    strTempChar2 = Asc(Mid$(Text, i, 1))
    strTempChar = Asc(Mid$(Text, i, 1)) + VariableBase
    VariableBase = strTempChar2


    ASCIIbuffer = vbEmpty

    If strTempChar > 255 Then
    ASCIIbuffer = strTempChar - 255
    strTempChar = 255
    End If


    y = vbEmpty

    If ASCIIbuffer = vbEmpty Then
    x = Chr(strTempChar)
    End If

    If ASCIIbuffer <> vbEmpty Then
    x = Chr(strTempChar)
    y = Chr(ASCIIbuffer)
    End If

    If y = vbEmpty Then
    z = z + x
    End If

    If y <> vbEmpty Then
    z = z + x + y
    End If



    70 Next i
    Crypt = Text

    Text = z

    Output = Text
    End Function

    Private Sub Command1_Click()
    Dim x
    x = Text1.Text
    Crypt (x)
    Text2.Text = Output
    End Sub

    Public Function DeCrypt(Text As String) As String
    Dim strTempChar As String
    Dim strTempChar2
    Dim Hash
    Dim Base
    Dim Base2
    Dim VariableBase
    Dim ASCIIbuffer

    Dim x
    Dim y
    Dim z

    On Error Resume Next


    For i = 1 To Len(Text)

    If Asc(Mid$(Text, i, 1)) = 255 Then
    strTempChar = (Asc(Mid$(Text, i, 1)) + Asc(Mid$(Text, i + 1, 1)))
    strTempChar2 = strTempChar / 2
    x = Chr(strTempChar2)
    z = z + x
    i = i + 1
    If i > (Len(Text)) Then
    GoTo 80
    End If
    GoTo 70
    End If

    If i = 1 Then
    strTempChar = Asc(Mid$(Text, i, 1)) / 2
    x = Chr(strTempChar)
    z = z + x
    GoTo 70
    End If

    If Asc(Mid$(Text, i, 1)) <> 255 Then
    Base = Asc(x)
    strTempChar = Asc(Mid$(Text, i, 1)) - Base
    x = Chr(strTempChar)
    z = z + x
    End If


    70 Next i
    80 DeCrypt = Text

    Text = z

    Output = Text
    End Function

    Private Sub Command2_Click()
    Dim x
    x = Text3.Text
    DeCrypt (x)
    Text4.Text = Output
    End Sub
    ______________

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    sorry kedamen, but it still doesn't work
    NXSupport - Your one-stop source for computer help

  12. #12

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    WOW HAVocINCARNATE29, it works!!!!

    I have 2 questions...


    1. How do I decrypt it?
    2. can you please give me the code just for the second version please!!!
    NXSupport - Your one-stop source for computer help

  13. #13
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    AAAaaaah! Great!
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  14. #14

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    Wait a sec, Kedman,
    I'm still interested in your encryption
    can you please send me a vb project file?
    NXSupport - Your one-stop source for computer help

  15. #15
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    to decrypt it put the weird text (cyphertext) in textbox3 and hit command2


    this is all the code i have at the moment but you are welcome to use it.



    i hope i helped. tell me if you need anything.
    actually i just mostly finished an encryption program of mine and you can see it in afew minutes at:

    http://members.theglobe.com/shotupdate/crypt.exe

    its not done yet. just very beta-ish (like the splash screen)
    ______________

  16. #16
    New Member
    Join Date
    Jun 2000
    Location
    Pennsylvania
    Posts
    11
    Can someone help me please? Please?
    I need some help. I am VERY new to VB 6.0. I am adding a GUI to an existing VBScript administration utility. Basically I just want to have users click a command button, have it open a Command Prompt and run an application by automatically entering something like "c q compname" where "compname" is a computer NetBIOS name and a variable that the user already entered. I have it programmed to open DOS shell, but send keys does not work, I don't think the DOS window is getting the Focus either, not sure if that matters. Please HELP!
    Chris
    Systems Analyst
    Visual Studio 6 Enterprise SP1 (VB6)

  17. #17

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    Ohhhhh, I see how it works
    NXSupport - Your one-stop source for computer help

  18. #18

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    Nice program!!!!!!!!!!!!

    its like if you don't want someone seeing a file, you encrypt it




    Very Cool!!!!!!!!
    NXSupport - Your one-stop source for computer help

  19. #19
    New Member
    Join Date
    Jun 2000
    Location
    Pennsylvania
    Posts
    11
    Anyone help me out?
    Chris
    Systems Analyst
    Visual Studio 6 Enterprise SP1 (VB6)

  20. #20
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    dimava, what didn't work? What errors did you get?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  21. #21

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I think that you would get more responces if you posted a new thread
    NXSupport - Your one-stop source for computer help

  22. #22
    New Member
    Join Date
    Jun 2000
    Location
    Pennsylvania
    Posts
    11
    I have opened 2 new threads, no replies. If no one here can help me do they know of another site at least? Thanks!
    Chris
    Systems Analyst
    Visual Studio 6 Enterprise SP1 (VB6)

  23. #23

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    Really? when did you post the treads, give it a few days
    NXSupport - Your one-stop source for computer help

  24. #24
    Hyperactive Member
    Join Date
    Dec 1999
    Posts
    321

    Lightbulb Hey ck

    You can use the /c with command.com (or cmd.com).

    It works like this:

    If you run
    somevar = hello
    Shell "command /c somecmd " & somevar

    then vb would first open up a dos-box and run command which would run the following from the prompt:
    C:\Windows> somecmd hello

    and that should do it...

    you can also create a batch file if you want to run several commands, then you just run
    Shell = (path & ) "command.com /c myfile.bat"
    where myfile.bat is where all the commands are..


    simple!
    Signed, Rodik ([email protected])
    Programmer,usesVB6ED
    ===========================
    Copyright©RodikCo,2002.

    Dont mind this signature ;] Its old

Posting Permissions

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



Click Here to Expand Forum to Full Width