How To Encrypt A Value To Store In A Registry And Decrypt From The Registry
Hi all, I am developing a demo pack for my software.In that i need to retrieve the system current date and store in the registry in an encrypted way. How to encrypt the system date and decrypt back from the registry for comparing its value with another date value.plaese help me in this. thanx, indhuja
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Encrypt Registry Settings
hey, im wanna try to encrypt a password that i have saved to the registry. can any tell me any good tutorials or methods of doing this???
Thanks
Registry To Store A Password
heya,
I'm pretty new to VB, i've been given an assignment to create a simple Win32 program.
What i want for the program is some kind of security to only allow authorised people have access to the programs functionality.
I was told by my tutor to use the registry for a password. ive figured out how to create entries into the registry, but my problem is that im not sure how to get the value of a registry key, and compair it to what the person has typed into a textbox.
can anyone help?
How To Store Data In Registry Using VB
Hi Guys,
For security purposes i would like to store the username and passwords
in the registry settings(instead of database) . If any one help to me it will be very useful to me.
with regards,
SivaL
Store Registration Info In Registry??
Do people typically store registration information (i.e., username, address, email address, registration number, etc...) in the registry? If so, do you encrypt any of the information? Thanks in advance!!
Can I Store My Program Setting Into Registry?
can i store my program setting into registry ?
for example i just wanna store a value 100 into registry and retrieve it next time when i run the program ..
is it complex and difficult to do so ??
I Want To Store A Key In The Registry, But Read It Separated
I have a name people enter into my application, they enter the name, age, and occupation, and when they click 'ADD' it adds it to a Listbox, now when they highlight the name in the listbox I want it to show the name age occuption (on diff textboxes). How would I go about doing this?
I Wanna Store Encryted Information In Registry
Hi vb friends,
I wanna store encryted information in the windows registry.
Can you give some code for that ?
Thanks in advance
This Forum is Great
********************************************
Itz a Burd, itz a plein, no itz zuperman....
********************************************
Encrypt$ And Decrypt$
Hi,
I'm learning about encrypt and decrypt strings.
But in the code that i have, i encrypt a string from a textbox to a txt-file. Or decrypt a txt-file to a textbox. Now my problem is: i will be able to encrypt a string from textbox1 to textbox2 and not to a txt-file. And also decrypt the string from textbox2 to textbox1.
I'm using for exemple "code 500".
Some idea?
Br. Peter.
Help, Need Encrypt / Decrypt For VB To PHP
I've looked high and low for this and can't find anything.
All I want to do is take say 5 surnames
smith|jones|harris|johnson|finch
Then run a Encrypt routine on them in Visual basic, and send them to a php file and do a Decrypt on them.
I can already send the 5 surnames to php without problems from VB, but I would like to do it securely. I've been trying to follow the blowfish encryption, but found it a bit difficult. Any pointers in the right direction appreciated.
Thanks
M
Encrypt Decrypt ???
any idea, is it advisable to make my own dll that decrypts and encrypts a password or just download some of it in the net???
Encrypt And Decrypt
Hello,
I have a problem running my security password. even if i enter the correct user name and password still cannot get through the main form. msgbox always shows the wrong password.
Hope you could help me.
any suggestion in making security password would be highly appreciated
thanks
A Way To Encrypt And Decrypt
VB Code:
Public Function Encrypt(Value As String) As StringDim i As Long, NewValue As String, Acs2 As String, MidString As StringFor i = 1 To Len(Value)MidString = Mid$(Value, i, 1)Acs2 = MidStringAcs2 = Asc(Acs2)Do Until (Len(Acs2) = 15)Acs2 = "0" & Acs2LoopNewValue = NewValue & Acs2Next iEncrypt = NewValueEnd FunctionPublic Function Decrypt(Value As String) As StringDim i As Long, NewValue As String, MidString As StringFor i = 1 To Len(Value)If (i <> 1) Then i = i + 14If (Mid$(Value, i, 15) = "") Then Exit ForNewValue = NewValue & Chr(Mid$(Value, i, 15))Next iDecrypt = NewValueEnd Function
Encrypt/Decrypt
Hey All,
Can someone show me a simple encrypt/decrypt code that only
uses the following characters...
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
I just do not understand how to do it.
Thanks in advance,
Ron
Encrypt/Decrypt
Hi,
I wrote this code for encryption/decryption, is there a way to change it so I would use text instead of writing the name of each form and textboxes in my project?
VB Code:
Dim c As IntegerDim d As IntegerPublic Function encrypt(text As String)For c = 1 To Len(Form1.Text1.text)i = Mid$(text, c, 1)Form1.Text2.text = Form1.Text2.text & Chr(Asc(i) + 40 * Len(text)) Next cEnd Function Public Function decrypt(text As String)For d = 1 To Len(Form1.Text2.text)i = Mid$(Form1.Text2.text, d, 1)Form1.Text3.text = Form1.Text3.text & Chr(Asc(i) - 40 * Len(text))Next dEnd Function
Thanx
Aaron
Encrypt/decrypt
hi friends,
can anyone get me the code to encrypt a string i want the output string to be of the same length.
thanx
Encrypt/decrypt
i'm saving passwords to a dat.file.....
how do i encrypt and decrypt those passwords......
thankz....
To Encrypt And Decrypt........
Hi Folks!!
I am looking for an active x control in VB,or any source code for that matter which would enable me to encrypt and decrypt any document file or Gif file or Bmp file and the like ...
thanking u,
peri
< Encrypt Decrypt >
Does anyone have an encrypt and decrypt that can do sound files as well...ie..wav and mp3. I have one that uses binary but it can't handle wav or mp3.
Encrypt And Decrypt
Can anyone check my code:
Here is my code in module
Global VarTest As String
Global CatchLogger As String
Global LoggeR As String
Function Encrypt(InputTxt As String)
For ctr = 1 To Len(InputTxt)
Encrypt = Encrypt + Chr(Asc(Mid(InputTxt, ctr, 1)) + 69)
Next ctr
End Function
Function Decrypt(InputTxt As String)
For ctr = 1 To Len(InputTxt)
Decrypt = Decrypt + Chr(Asc(Mid(InputTxt, ctr, 1)) - 69)
Next ctr
End Function
Here is my code in the command button
Static counter As Integer
Set db = OpenDatabase(App.Path & "finance.mdb")
Set rs = db.OpenRecordset("Login", dbOpenTable)
rs.Index = "Uname"
rs.Seek "=", Text1.Text
If rs.NoMatch Then
MsgBox "User name is not valid", vbInformation
Text4.Text = Val(Text4.Text) + 1
If Val(Text4.Text) > 3 Then
MsgBox "Unauthorized user"
Unload Me
Exit Sub
End If
Else
If Decrypt(rs.Fields("Pass")) = Text2.Text Then
VarTest = 0
Command1.Visible = False
Command2.Visible = False
MsgBox "User access granted"
Uservar = Text1.Text
rs.Close
db.Close
MAIN.Show
Unload Me
Else
MsgBox "Wrong Password"
Text4.Text = Val(Text4.Text) + 1
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
If Val(Text4.Text) > 3 Then
MsgBox "Unauthorized user", vbCritical
Unload Me
Exit Sub
End If
End If
End If
My problem is everytime i put the right username and password still the message box is wrong password. cannot decrypt the table.
]lease help me
Thankx
Encrypt And Decrypt
Hi,
I want to encrypt the data what ever i have entered in the text box and it should be saved as file. How can i do that?
Please give me the code!
Encrypt / Decrypt In VB
I have an encrypted file that I want VB to decrypt at a certain time. Is there anyway to do this or any software/.DLL out there that can do this for me?
Encrypt / Decrypt
Hi, is there a simple way of encrypting & decrypting a text file that is compatible in Visual C++ and Visual Basic?
How? Kindly give me a sample.
Thanks
Encrypt/decrypt
Can someone tell me why this dosen't work like I want it to.. Am I not using Step appropriatly? Please help.. thanx. Justin
private Sub cmdDecrypt_Click()
Length = len(txtHidden.Text)
for Letter = 2 to Length step 4
txtOriginal.Text = txtOriginal.Text & mid(txtHidden.Text, Letter, 1)
next
End Sub
private Sub cmdHide_Click()
If len(txtHide.Text) > len(txtHidden.Text) then
MsgBox "Might want to add more letters to hidden for optimal hiddage!", , "Problem"
Exit Sub
End If
Length = len(txtHide.Text)
EncryptedText = txtHidden.Text
for Letter = 1 to Length
txtHidden.Text = Left(txtHidden.Text, 2) & mid(txtHide.Text, Letter, 1) & Right(txtHidden.Text, 2) & txtHidden.Text
next
End Sub
VB6.0 Retrieve A Field Value From Access 2000 And Store In Registry?
I want to retieve a field value from an SQLPass through query from an Access 2000 database and the store the returned value in the registry. Without the user seeing it happen and with no user input. I can upon access, open query, but how do i pull one value from the query and store it in the reg.?
database = database.mdb
Query and field Get_Doc.doc_lname
Encrypt Decrypt File
I am using xor to encrypt a file and using the same sub to try to decrypt it back into plain text - I have 2 command buttons for this. It doesn't seem to work, what am i missing ?? It does encrypt it fine. Thanks for the help.
Here is my code:
Private Sub Command1_Click()
Dim ff As Integer
Dim i As Long, n As Long
Dim b As Byte
ff = FreeFile
Open App.Path & "REFERENCE_DATA.dat" For Binary As #ff
n = LOF(ff)
For i = 1 To n
Get #ff, i, b
Put #ff, i, b Xor &HFF
Next i
Close #ff
MsgBox "file encrypted"
End Sub
Private Sub Command2_Click()
Dim ff As Integer
Dim i As Long, n As Long
Dim b As Byte
ff = FreeFile
Open App.Path & "REFERENCE_DATA.dat" For Binary As #ff
n = LOF(ff)
For i = 1 To n
Get #ff, i, b
Put #ff, i, b Xor &HFF
Next i
Close #ff
MsgBox "file decrypted"
End Sub
Encrypt/decrypt Data
Hi I would like to find out if there's any way I can write a visual basic program to encrypt and decrypt data. Are there any APIs that I can use?
regards
Patsy
Encrypt/decrypt Textfile
Ive seen lots of codes that does textfile encryption and decryption, but not the one Im looking for. Is there a way to encrypt it as hexadecimal and decrypt it back to its original format?
Encrypt/decrypt Images?
Is it possible to Encript images(*.Jpg) using some password and
inside a vb6 exe Decrypt/show them?
The password should be "123456789"
And i whant to use the LoadPicture("d:someimage.jpg") function
Please anyone...
thanks
Encrypt/Decrypt String
Hi
How 'll we encrypt and decrypt a string in VB 6 using CryptEncrypt api with most secured way.
Also need to store the encrypted output in a file/windows registry.
Please help.
Biju Alapatt
Encrypt/Decrypt String With API
Hi.
I have been searching the forum but have not found exacly what I want to know: Is there a API in Windows for encrypting/decrypting a string?
The reason I want this is that I'm writing a program that will except an encrypted string from other programs (that other people are writing) and it would be easy for me to just say: Use that API and this key when encrypting.
There seem to be a function CryptEncrypt in advapi32.dll that does the job but not in a very easy way.
Encrypt/DeCrypt File
hi
i want to encrypt an image through vb Code
can any body tell me how to encrypt / decrypt an image (tiff file) thru Visual Basic.i have done it using Encrypt/decrypt function. it has several problems
I came to know that Microsoft CAPI is the better solution for it. I am not able to get the related API. Kindly guide me
thx in advance
Sakshi
How To Encrypt & Decrypt A File
Is there any API functions in VB6.0 to encrypt and decrypt a file. In case if it is there, then explain me with source code.
Mail me soon...
Thanx in Advance...
How To Encrypt/decrypt A File
hi friends,
i want to encrypt/ decrypt files. can u help me to get some code to achieve this. i want a simple and fast encryption code. i have some but they are taking a long time. and it should not change the file size.
thanx
Encrypt/Decrypt DATES UGH!!!
12:00:00 AM is the 'default' setting for an empty Date variable.
Like if you write Dim x as Integer. X will be 0 until you tell it otherwise.
Have fun.
Help With Encrypt/decrypt Code...
Hi,
I have an app. which reads in a delimited text file and encrypts the file then writes it back to another text file, (see code below).
The problem is that once the new encrypted text file has been created I can't read it back in to the app to decrypt it and write it back to a new text file.
Can anyone show me how to read in an encrypted file and decrypt it using the basic encryption method below?
Private Sub EncryptFile()
Dim in As Integer, out As Integer
Dim infile As String, outfile As String
Dim tmp_name As String, tmp_age As String
Dim fname As String, fage As String
in% = FreeFile()
infile$ = App.Path & "original.txt"
Open infile$ For Input As in%
out% = FreeFile()
outfile$ = App.Path & "encrypted.txt"
Open outfile$ For Output As out%
Do While Not EOF(in%)
Input #in%, fname, fage
tmp_name = Crypt(fname)
tmp_age = Crypt(fage)
Write #out%, tmp_name, tmp_age
Loop
Close in%
Close out%
End Sub
--- Basic Encryption Method from Karl Moore ---
Private Function Crypt(p_text As String) As String
Dim tmp_char As String
For i = 1 To Len(p_text)
If Asc(Mid$(p_text, i, 1)) < 128 Then
tmp_char = Asc(Mid$(p_text, i, 1)) + 128
ElseIf Asc(Mid$(p_text, i, 1)) > 128 Then
tmp_char = Asc(Mid$(p_text, i, 1)) - 128
End If
Mid$(p_text, i, 1) = Chr(tmp_char)
Next i
Crypt = p_text
End Function
Encrypt Decrypt Program
Hi everyone, I made a VERY VERY VERY VERY Simple Encrypt Decrypt program...
Please note it's in Beta release
Bitmap Encrypt / Decrypt
hiya all,
Just wondering how to use vb to encrypt a bitmap file and then be able to decrypt it, it doesnt have to be the best encryption.
Thanks
Encrypt And Decrypt .EXE-files
I want to encrypt an .EXE-file. When I execute the file it must be decrypted such as like a virtual machine.
Any ideas how to do this?
thx, vbzero
Encrypt/Decrypt A Whole File
Hey, Using the code below, i want to be able to ENCRYPT a whole TEXT FILE...
I am not sure how i would make it ENCRYPT a whole file using this, So could someone make it workable? or maybe if someone has an encryption script maybe LIKE THIS ONE or better that will encrypt a FILE/ DECRYPT
::USE:: I am saving a bunch of program settings, and i don't want people to edit them,, so i want my program to SAVE ALL THE SETTINGS, to the file, ENCRYPT IT, and then when i want to open it, it will DECRYPT , and Read it (I have it so i can read it)..
THANKS ALOT
PS: or would i have to import it all into a textbox, and then encrypt the Textbox?? THANKS- i would like to get the program to encrypt it with out textfile.. thanks again
Code:
'<<------------------------------------------>>
'START EN/DE crypt PARTS
'<<==========================================>>
#Const CASE_SENSITIVE_PASSWORD = False
Private Sub cmdEncrypt_Click()
' You can encrypt twice for extra security
txtText = EncryptText((txtText), txtPassword)
txtText = EncryptText((txtText), txtPassword)
End Sub
Private Sub cmdDecrypt_Click()
txtText = DecryptText((txtText), txtPassword)
txtText = DecryptText((txtText), txtPassword)
End Sub
'Encrypt text
Private Function EncryptText(strText As String, ByVal strPwd As String)
Dim i As Integer, c As Integer
Dim strBuff As String
#If Not CASE_SENSITIVE_PASSWORD Then
'Convert password to upper case
'if not case-sensitive
strPwd = UCase$(strPwd)
#End If
'Encrypt string
If Len(strPwd) Then
For i = 1 To Len(strText)
c = Asc(Mid$(strText, i, 1))
c = c + Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
strBuff = strBuff & Chr$(c And &HFF)
Next i
Else
strBuff = strText
End If
EncryptText = strBuff
End Function
'Decrypt text encrypted with EncryptText
Private Function DecryptText(strText As String, ByVal strPwd As String)
Dim i As Integer, c As Integer
Dim strBuff As String
#If Not CASE_SENSITIVE_PASSWORD Then
'Convert password to upper case
'if not case-sensitive
strPwd = UCase$(strPwd)
#End If
'Decrypt string
If Len(strPwd) Then
For i = 1 To Len(strText)
c = Asc(Mid$(strText, i, 1))
c = c - Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
strBuff = strBuff & Chr$(c And &HFF)
Next i
Else
strBuff = strText
End If
DecryptText = strBuff
End Function
Is There Anyway To Encrypt Or Decrypt Files?
I have been looking in the net to find an API call for encrypting or decrypting files and I find one call which was (decryptfile) but unfortunatly there is no support for win98.
Does any bocy know how to do that with an API call or without it I really appreciate it.
================
Kourosh
================
Password Encrypt And Decrypt
My problem is even i put the correct user name and password still cannot go through my main form. I have my encrypt and decrypt in the module.
thanks in advance
Encrypt/decrypt Files Over 1 MB
Could anybody help me in finding out a solution for encrypting/decrypting any kind of files over 1 MB. Are there any such dlls available which would help me in achieving my objective.
I would like to use the dll in VB 6 through code on win 2000.
Does Window Store A File's Name In Registry When Selected Or Clicked By Mouse
hey ....
i have developed an application which (is associated and) reads data from access db with a different extension to them. when a user double clicks on these type of files, my application does open but the user has to select 'Open' option to open the required file again.
what i want to do is that when the user clicks on data base file, my application should open and read the data automatically and the user wouldn't need to select 'Open' option again to open it.
i think when a user clicks once or twice on a file to select or open it, windows inserts values in registry (like the file name etc.). i do know how to read the registry; soooo....if i can find the registry name where these values r being stored then i can make my application to check the registry value and if it ends with my (user-defined) extension (for DB files), then it will directly read the data and not ask the user to open the file again.
anyways......it'll b great if u could help me on this. if u have a solution in regard with the above mentioned (my idea of a ) solution to the problem mentioned in the first paragraph..... or .... if there's another way of reading the file name of the file clicked as soon as my application starts then that wud b really cool too.
Thanx !!!!
|