|
-
Jun 23rd, 2000, 10:29 AM
#1
Thread Starter
Frenzied Member
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
-
Jun 23rd, 2000, 12:00 PM
#2
Fanatic Member
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
-
Jun 23rd, 2000, 06:12 PM
#3
transcendental analytic
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.
-
Jun 23rd, 2000, 08:58 PM
#4
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.
-
Jun 23rd, 2000, 09:46 PM
#5
Thread Starter
Frenzied Member
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
-
Jun 24th, 2000, 12:01 AM
#6
Yes, I think you can encrypt it using a method of binary encryption.
-
Jun 24th, 2000, 12:01 AM
#7
Thread Starter
Frenzied Member
NXSupport - Your one-stop source for computer help
-
Jun 24th, 2000, 09:20 AM
#8
transcendental analytic
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.
-
Jun 24th, 2000, 09:22 AM
#9
Thread Starter
Frenzied Member
Ohhhhhh maybe that's why, I didn't download the module
NXSupport - Your one-stop source for computer help
-
Jun 24th, 2000, 09:27 AM
#10
Hyperactive Member
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
-
Jun 24th, 2000, 09:30 AM
#11
Thread Starter
Frenzied Member
sorry kedamen, but it still doesn't work
NXSupport - Your one-stop source for computer help
-
Jun 24th, 2000, 09:37 AM
#12
Thread Starter
Frenzied Member
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
-
Jun 24th, 2000, 09:47 AM
#13
transcendental analytic
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.
-
Jun 24th, 2000, 09:50 AM
#14
Thread Starter
Frenzied Member
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
-
Jun 24th, 2000, 09:56 AM
#15
Hyperactive Member
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)
-
Jun 24th, 2000, 09:58 AM
#16
New Member
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)
-
Jun 24th, 2000, 10:00 AM
#17
Thread Starter
Frenzied Member
Ohhhhh, I see how it works
NXSupport - Your one-stop source for computer help
-
Jun 24th, 2000, 10:03 AM
#18
Thread Starter
Frenzied Member
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
-
Jun 24th, 2000, 10:05 AM
#19
New Member
Chris
Systems Analyst
Visual Studio 6 Enterprise SP1 (VB6)
-
Jun 24th, 2000, 10:07 AM
#20
transcendental analytic
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.
-
Jun 24th, 2000, 10:08 AM
#21
Thread Starter
Frenzied Member
I think that you would get more responces if you posted a new thread
NXSupport - Your one-stop source for computer help
-
Jun 24th, 2000, 10:09 AM
#22
New Member
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)
-
Jun 24th, 2000, 10:11 AM
#23
Thread Starter
Frenzied Member
Really? when did you post the treads, give it a few days
NXSupport - Your one-stop source for computer help
-
Jun 24th, 2000, 10:20 AM
#24
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|