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
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
================
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.
How To Encrypt And Decrypt Data Files
I have a data file that I wish to encrypt and decrypt as the program needs the file. However I don't have a clue were to start with this.
Once the encrption and decryption is working properly is their a version of windows that it work better with than others.
Also I have a form that has two combo boxes one of which willl be hidden and never be seen. This form is for deleteing a record. If a record is delete out of the first combo box I also wish to delete the corresponde data in the one that is hidden. Can this be done and if so how.
Encrypt/Decrypt Saved Files?
Being completely honest with everyone i am a grade 12 going to college next semester for computer programming analyst so im not a pro.
I would like to know if there is a way to encrypt the variables that are saved to file from VB and then how to decrypt them. it is very easy for anyone just to edit the file in notepad etc.
Thank You! Your help is much appreciated
Encrypt/Decrypt Tiff Files
Hello:
Does someone have a solution for the following scenario?
I want to encrypt some Tiff files. I have a viewer created in vb6 that has the right "key" that allows the user to view the files. If someone else tries to view the files, they shouldn't be able to. What control or technique can I use to accomplich this?
Thank you.
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
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/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
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
Auto Encrypt/Decrypt Addin To VB6
I am working with an Addin to VB6 that will encrypt and decrypt all files loaded and saved by VB automatic, I have gotten the part of encryption, (at "AfterWriteFile" event, but how can I decrypt the file before VB Load it?
PS: I was not sure in wich forum to post this, so Moderators, please move this if you can think of a better place
Encrypt And Decrypt Data By CryptoAPI
I had program to encrypt and decrypt data using CryptoAPI, when I encrypt and decrypt from a DLL, everything is OK, but when encrypt by public-key1 from DLL1 and decrypt by private-key from DLL2 it has problem I can decrypt by other private key, all private key from other key pairs can decrypt. I don't know why. If you know, please tell me how to sovel this problem. Thanks.
Anyone Have A Very Very Fast Encrypt/decrypt Function?
Heres what im currently using:
VB Code:
Public Function enc(m As String) As StringOn Error Resume Next Dim a As Long, x As Long, z As String For a = 1 To Len(m) x = Asc(Mid$(m, a, 1)) z = Chr$(x + 2) Mid$(m, a, 1) = z Next a enc = mEnd FunctionPublic Function dec(m As String) As StringOn Error Resume Next Dim a As Long, x As Long, z As String For a = 1 To Len(m) x = Asc(Mid$(m, a, 1)) z = Chr$(x - 2) Mid$(m, a, 1) = z Next a dec = mEnd Function
But im looking for something faster
Encrypt With CAPICOM [RESOLVED Using DECRYPT}
Why doesn't CAPICOM encrypt data the same way more than once?
I enter a password into a textbox, and call Encrypt(), which uses the .dll to encrypt data. It isn't the same a second time.
Code:
ff = FreeFile
Open "pw.txt" For Output As #ff
For x = 1 To 5
Print #ff, Encrypt(txtPassword.Text)
Next x
Close #ff
Produces this:
Quote:
MGIGCSsGAQQBgjdYA6BVMFMGCisGAQQBgjdYAwGgRTBDAgMCAAACAmYQAgIBAAQQ
AAAAAAAAAAAAAAAAAAAAAAQQ/8hvQbPrJDNSEl4YrFs9gwQQRupJbq3hWT/5fK/3
Mb706A==
MGIGCSsGAQQBgjdYA6BVMFMGCisGAQQBgjdYAwGgRTBDAgMCAAACAmYQAgIBAAQQ
AAAAAAAAAAAAAAAAAAAAAAQQqqMoffknwTRI0PZT4s0EIgQQttFbkW5fVqNaCajd
C7Eocg==
MGIGCSsGAQQBgjdYA6BVMFMGCisGAQQBgjdYAwGgRTBDAgMCAAACAmYQAgIBAAQQ
AAAAAAAAAAAAAAAAAAAAAAQQGrN4wi9x6UXTxy2pcdyz7QQQ7puJuqAYeNhtvs88
QrXNXw==
MGIGCSsGAQQBgjdYA6BVMFMGCisGAQQBgjdYAwGgRTBDAgMCAAACAmYQAgIBAAQQ
AAAAAAAAAAAAAAAAAAAAAAQQBJk1FoHLNqeh71P7ZjU3aAQQycvI0xBGsRrXLPgk
v9alzA==
MGIGCSsGAQQBgjdYA6BVMFMGCisGAQQBgjdYAwGgRTBDAgMCAAACAmYQAgIBAAQQ
AAAAAAAAAAAAAAAAAAAAAAQQOL4dG5uMMDDh1ljwsBDehgQQPvHzpcl3pFdWIKgX
bkolNA==
It is getting changed somehow, and I don't know why.
Any Ideas?
Encrypt & Decrypt Logical Problem !
Hai ,
The below is the Code to store the ImplementedDate in the System after Encrypting
Private Sub Encrypt_Click()
Call ImplementedDate
End Sub
Sub ImplementedDate()
Secret$ = Now
Password$ = "vehichlesystem"
Dim nFile As Integer
nFile = FreeFile
Open "C:chsImpDate.TXT" For Append Shared As #nFile
Print Secret$
Call Encrypt(Secret$, Password$)
Print #nFile, Secret$
Close #nFile
End Sub
Sub Encrypt(Secret$, Password$)
L = Len(Password$)
For X = 1 To Len(Secret$)
Char = Asc(Mid$(Password$, 1, 2))
Mid$(Secret$, X, 1) = Chr$(Asc(Mid$(Secret$, X, 1)) Xor Char)
Next
End Sub
FDYDCYDFFBV@LCDLGCV&;
Above is the Encrypted value for the function Encrypt
Every Day I at 12:01 I need to open the file and Decrypt value. So that I will get the implemented date. Then I will add Day + 1. So I could protect.
But what the value I will give for the Secret$ and Password$ in the Decrypt Function.
Sub Decrypt(Secret$, Password$)
L = Len(Password$)
For X = 1 To Len(Secret$)
Char = Asc(Mid$(Password$, 1, 2))
Mid$(Secret$, X, 1) = Chr$(Asc(Mid$(Secret$, X, 1)) Xor Char)
Next
End Sub
Actually I can’t use a Public Variable to store and pass the values because From the Maintenance tool application I am going to Encrypt and store the Values and from the Vehicle system application I am going to retrieve the Decrypted values.
The purpose is when installing the Maintenancetool the ImplementedDate will be encrypted and store in this path
"C:chsImpDate.TXT"
and in the VehicleApplication when every user Login - his System date will be compared with the "C:chsImpDate.TXT" after its Decrypted.
I plan to add the Maintenance tool application in the Scheduled Task which will start running at 12:01 Am and it will get the date from the "C:chsImpDate.TXT" after Decrypting and add 1 day to the date and then its again Encrypted and stored in the same path "C:chsImpDate.TXT"
So that if any user from the VehicleApplication changes his date then I could give a warning.
Below is the code I tested and here I am going to place the code to get the Date and Decrypt and add 1 day and again Encrypt and I will store there. Now its working for the below
Private Sub Timer1_Timer()
MyTime = Format(TimeValue("06:55:55 PM"), "HH:MM:SS AM/PM")
CurTime = Format(Time, "HH:MM:SS AM/PM")
If MyTime = CurTime Then
MsgBox "Now All Matching"
End If
End Sub
what’s the way to get the original value with this code or what’s
The Other way to code the Encrypt and Decrypt and solve this problem. Sample code.
For the ImpDate.Txt should only have access for the administrator, if possible I should only have access.
Thank you very much,
Chock.
Encrypt Decrypt Using Public And Private Key
hi,
i need to develope a system that can send sticky note with encrytion and decryption using public key and private key.
i hope those can help me pls let me know abt it.. coz i need this information urgent.. my final report presentation is near already... but i still cant do it..
hope can get help from u all...
laifun
Encrypt And Decrypt Mpeg File
i want encrypt mpeg file and then decrypt it.. then play it .. and i can encrypt and decrypt it and i can play an mpeg file from a localpath ... but i want play decrypted file (or mpeg file) from memory Or i want function that get byte of mpeg file and show it to me ....plz? plz¿ it's for me very important...
Code:public class a_Video_player_Class
public sub Load_Movie_From_Memory_And_Play_It(B() as byte,Start as integer)
'¿...i dont know...?
end sub
end class
Edit: (Changed Subject to something more usefull - CanOz)
Edited by - CanOz on 1/9/2005 5:23:04 PM
|