Design A Program That Can Encrypt And Decrypt Messages Stored In Simple Text Files Using A Private Key Stored In A Separate File?

Jun 13, 2011

Need to design a program that can encrypt and decrypt messages stored in simple text files using a private key stored in a separate file. Software should also be able to allow the users to enter simple messages that either displays the encrypted or decrypted message. The encryption method should use a simple substitution method. It should be set out in the following format:

Example (the "@" is the separator):

@
The character The Code End of line
A @ 4gh EOL
B @ 84!9 EOL

Has to use the 256 ASCII character codes. The separator will be used to separate the character and its corresponding code.Here are the pseudocodes I have come up with:

� Read any private key file
separator = readline(file);
while not EOF(file) do
tempStr = readline(file);

[code].....

View 5 Replies


ADVERTISEMENT

Make A Program To Encrypt And Decrypt Messages?

Jul 22, 2010

I want to make a program to encrypt and decrypt messages using a word cipher or random lettering(no duplicate letters) etc.

I've got 2 input boxes:
input text and keyword box
Two Buttons:
encrypt and decrypt

This is about all I have coded so far

Code:
Private Sub Encrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Encrypt.Click
Dim EncryptInput As String

[Code]....

I have a few guess how to do this (not 100%) but setting up some sort of array might be one (not sure if it's the easiest)

Edit: one thing for sure I want to be able to separate the characters in the keyword into the start of an array (if the array is the best option)

I don't necessarily need code, I just need some advisement on how to approach this with commands. I don't know too many commands (only remember some fortran)

View 9 Replies

DB/Reporting :: Database - Access Denied To A Text File (since It's Stored In The Program Directory In The Program Files)

Sep 20, 2010

I have a program where a lot of the required information for it is stored in text files. I simply read this information into large arrays. However, I don't think it's necessary to load all the information each time. Rather, it would be more efficient if I could simply search through a list of items to find the one I need and then use the data from it, or to find a similar name and use it elsewhere.

Would I be right in using a database? And is database programming done in SQL? I have a book on it telling me to use the SQL Server (IIRC), so I shouldn't be doing it in the VB.NET Express GUI?

Here's an example of what I would do:

Hex = 03 00 => dex number 003
Search in file Pokemon Dex Numbers
003 returns Bulbasaur
Check Bulbasaur base stats in the base stats file
etc

So basically I'm reusing a lot of information. I think a database would be best and it would all be internal right? I'm getting complaints about access denied to a text file (since it's stored in the program directory in the program files).

So to cap up the few questions I have:

-Databases are done in SQL and not inside the GUI?
-Databases would load internally?
-I could search a database without having to load it into like an array or something?

View 2 Replies

Encrypt Text To A Textfile(.txt) And Then Decrypt It In A Diff. Program?

Feb 21, 2009

I am trying to encrypt text to a textfile(.txt) and then decrypt it in a diff. program.The encrypting part works fine.I have tried these functions in a textbox and they work perfectly, I get InvalidCastException when trying to decrypt from the .txt file.

[Code]...

View 2 Replies

Encrypt / Decrypt A Non-text File

Nov 12, 2009

I am interested in knowing if non-text files like .xls/.xlsx or .doc files can be encrypted... From the Devlopers Guide on MSDN, I found code snippets that allow encryption / decryption of .txt files. This works absolutely fine. However, I would like to know if similar procedure can be used to encrypt/decrypt file other than .txt file.

View 1 Replies

Encrypt / Decrypt Text In File

Jun 21, 2010

I have created a encryptor/decryptor that allows you to encrypt/decrypt text in a textbox, or a file. The basis of the system is to allow a user to thoroughly protect data within their system. Is there anyone that would be willing to test the program?

View 4 Replies

Encrypt And Decrypt Text File?

Jul 23, 2009

I save data from datagridview to text file . I also load the same data from text file into datagridview for edit and update the same thing to text file. Now i want to make my Drill layer header.txt in encrypted format to prevent anyone to open that file and modify out of program. They only can modify it through the program How can we do like this?

My Drill Layer Header.txt file is like this

T240C3.175F012S27H2000
T239C0.95F034S55H1000
T236C1.2F029S48H2000

[code]....

This code can encryp the text file. But accrding to this code EncryptFile("c:\Drill Layer Header.txt", _ "c:\Drill Layer Header original1.txt", _ sSecretKey) It ask for input and output file. So it take data from Drill Layer Header then encrypt the save in drill layer header original.txt. I want it to take data from drill layer header and encrypt and save in same file.

View 6 Replies

Encrypt And Decrypt A Serialized Text File?

Aug 14, 2010

For example I got this part of a method which serializes a textfile with a password and then encrypts it using the rijndael encryption method[code]...

View 8 Replies

Encrypt And Decrypt Text File Into Datagridview

Jul 23, 2009

I save data from datagridview to text file . I also load the same data from text file into datagridview for edit and update the same thing to text file. Let say this text file i called as Drill.txt. I have another text file called header.txt which need to match its value with the value of Drill.txt file then overwrite value from Drill.txt to header.txt. Now i want to make my Drill.txt in encrypted format to prevent anyone to open that file and modify out of program. They only can modify it through the program How can we do like this?

[Code]...

View 3 Replies

Asp.net - Decrypt Password Stored In Aspnet_membership Table

Jan 11, 2012

I am trying to decrypt my password stored in aspnet_membership table... I am using the following code,

[Code]...

but at the line of DecryptPassword(encodedPassword) it shows error as "Length of the data to decrypt is invalid."

View 1 Replies

Decrypt A Datetime.Now.Day String Stored In Registry Using Rijndael

Jun 2, 2012

I recently have been developing a app that uses the rijndael encrypt and decrypt function it stores dates in the registry (encrypted with a key using the algorithm)

for example Dim strOldDay As String = Key.GetValue("UserSettings", "").ToString the key was made using a private function called "createkeys"

example:
dim current as currentdate
Current.Day = DateTime.Now.Day.ToString
Current.Day = Encrypt(pPassPhrase, Current.Day)

[Code]....

View 3 Replies

Encrypt And Decrypt Files Using TripleDes Encryption?

Dec 26, 2011

I'm designing a program to encrypt and decrypt files using TripleDes Encryption algorithms but am having issues decrypting an image file. The file encrypts in the correct manner, but when I go to decrypt the file and open as an image I get an error message. One example is when trying to open the file in paint a message appears stating 'c:New FolderDecrypted.jpg Paint cannot read this file. This is not a valid bitmap file, or its format is not currently supported. My coding for the form is shown below:

"Imports System.Windows.Forms
Imports System.Security.Cryptography
Imports System.Security

[Code]....

View 10 Replies

Process Array Check - Encrypt/decrypt .dat Files?

Jan 12, 2009

Lets get down to it, Basically, I'm making a kind of "Anti-Hack" for a project I'm working on.The basis of the "Anti-Hack" is the check processes for names of known Memory Editors, For example, one memory editor I am scanning for is Cheat Engine.exe, I am using this code to scan for it, then I use the result to activate a different piece of code.

If Process.GetProcessesByName("Cheat Engine").Length = 0 The
'It's OK
Else
<Removed for obvious reasons>
End If

Basically, I don't want my code to look like a library of If statements when the only thing I am changing is the process name, what I want to do, is have an encrypted .dat file with an array or list of known tools. I want to then go through the array/list and keep checking for instances of them running.I know nothing of how to encrypt/decrypt .dat files through VB. (I'm not an expert at it atm )I am open to other ways (Easier ways) of doing this, like a Class with a list of names etc.

**NOTE** I would rather it be a separate file as the program features an Auto-Update feature, so it will be easier to update the list.

**IMPORTANT**Also, I would like to know how to hide my process, so it cant simply be ended, It may sound suspicious but people will be able to just close it and start hacking T_T, Unless there is another way, I would appreciate it (Like making it so it cant be ended etc.)**IMPORTANT.

View 3 Replies

VS 2010 - Creating Library To Encrypt / Decrypt Files With AES

Sep 20, 2011

I'm attempting to create a little library to encrypt and decrypt Files with AES. There are loads of examples of how to do this on the internet so coding is not a problem. There are however a few questions regarding cryptography and AES in general.

#1 Does the IV need to be kept a secret like the key ?
#2 Can I just hash a string with SHA512 to make a key for AES ? or do I need to use PasswordDeriveBytes ?
#3 In the case of me using PasswordDeriveBytes Do I need to keep the salt a secret ?(or do I need to keep it at all)
#4 Can I generate the IV from the same password that the Key is derived from ?(if so How ?)

View 1 Replies

Loads Of Text Files Stored In A Folder?

May 14, 2010

I am new to visual basics. I have loads of text files stored in a folder. I only want to chart some of the columns in the text files. How do I use visual basics to charts the data?

View 4 Replies

.net - Using Rjindael And RSA To Encrypt Data Stored In QR Code In Visual?

Jun 23, 2011

I'm wanting to encrypt some data (hopefully under five hundred bytes' worth) and store it in a QR code. Originally I wanted to use RSA, so the data would be signed with User A's private key and User B's public key, but unfortunately, VB.NET doesn't like encrypting that much data. I've read that I should use Rjindael to encrypt the actual data, and then use RSA to encrypt the key used by Rjindael. However, I'm not having much luck being able to search the web for some kind of tutorial or something.

Also, if I was wanting to store this on a QR code, wouldn't I have to store both the encrypted data and the encrypted key used by Rjindael? Do you think this would all fit? I may be able to use version 40 on medium error correction [URl].. it stores 18,672 "data bits"), but I would prefer to use a lower version (that is, smaller) if at all possible.Generating the QR code won't be the problem (I know there's a .NET library for that), I'm just curious about getting the data encrypted to begin with.

View 1 Replies

Vb 2005 : Encrypt The String Values Stored In The Code?

Jul 23, 2009

encrypt the string values stored in the code.The problem is that when the code is compiled and the .exe file is generated, anybody can edit the .exe file with an text editor or another program and see the values.This is very important for me, because i have some password stored in string variables?

View 1 Replies

Encrypt Or Decrypt Text?

Jan 10, 2009

I am using vb.net 2008 i want to Know how can i encrypt text in a text box save it to a file then read the file decrypt the text and finaly display it in text box .

View 5 Replies

VS 2008 Access Messages From SQL Statement/Stored Procedure?

Nov 10, 2009

If I run a SQL statement or execute a stored procedure from SQL Mgmt Studio, I will get two tabs: Results and Messages.I am lookig to return EXACTLY whats in the messages (the tab I'd see in SQL Mgmt Studio)window to a string variable. Is there a property in ADO.NET (maybe in the command object?)that contains the messages returned from a stored procedure? I am using VB 2008.

View 1 Replies

Encrypt And Decrypt Text From Textbox?

Jun 6, 2011

Is anybody know what is the easiest way to encrypt and decrypt text from textbox?

View 7 Replies

Encrypt / Decrypt Xml File

Jun 22, 2011

I need some help on saving/reading xml from/to dataset. I would like to make that complete file is encrypted and not only some elements inside or part of file.Currently this is not working in any way at all.[code]

View 14 Replies

Encrypt And Decrypt A File By Using VB?

Dec 23, 2011

I ended up getting this properly working, as far as encrypting a file goes:How to encrypt and decrypt a file by using Visual Basic .NET or Visual Basic 2005 However, the catch is I have to change the name of the output file. What I was hoping to do is overwrite the original with the encrypted file, but when I tried that on a large file, it ended up only getting about 8 bytes of it.

Does anybody have any suggestions or recommendations? The overall idea is that I want to keep a file encrypted until it needs to be unencrypted for use by a program, but I'm not sure if there are better tools out there or if there's a better way of accomplishing this.

Question 2: I would really, really like to encrypt an entire folder, which I'm guessing would be faster than file by file, but when I try I keep getting access denied errors, even with DOS Cipher. Is there a way to do this with a key?

View 2 Replies

Make A Program That Opens A File In The Folder The Program Is Stored?

Aug 26, 2009

How do I make a program that opens a file in the folder the program is stored?

View 6 Replies

VS 2008 Encrypt And Decrypt File?

Jun 16, 2009

The same thing that happens when you compile a script it turns in a non-readable mode but when it's opened in the right editor it's back for editing like normal.But just so it encrypts and decrypts the textfiles just like I said before.

View 3 Replies

VS 2010 Encrypt/Decrypt File?

Jan 31, 2012

I am after some code to encrypt/decrypt a file, with a feature to display theencryption/decryption process percentage.The following code works well for strings, but when I tried to use it on byte arrays, I get an out of memory error.

Public Function AESEncrypt(ByVal PlainText As String, ByVal Password As String, ByVal salt As String)
Dim HashAlgorithm As String = "SHA1" 'Can be SHA1 or MD5

[code].....

View 4 Replies

Encrypt And Decrypt Connection String In XML File?

Mar 4, 2010

I want to save my connection string in XML file.How to do that?How to encrypt and decrypt that file using VB.Net

View 2 Replies

Get A Textbox To Contain Text Of TXT File Stored On Web?

Nov 8, 2009

How would I get a textbox to contain the text of a TXT file stored on the web? For example, lets say I have a website. I uploaded a TXT file to it. How would I get the text from the TXT file and display it in a TextBox?

View 1 Replies

Email & SMTP - Program To Send Very Simple Text Email Messages

Feb 17, 2009

I'm trying to get my program to send very simple text email messages. I did do a search beforehand, and found that I was having the same issue as someone else, but the specific question I have was not answered --

I've learned that if you're trying to send mail, you need an SMTP server... I found this list here but every one of them I've tried yields the same "Failure sending mail" error.

Here's my

Dim mail As New MailMessage()

mail.From = New MailAddress("me@mycompany.com")
mail.To.Add("destination-email@whatever.com")

[CODE]...

Is the problem that I need to show "credentials" (i.e. user/pass)? If so, what would those credentials be? Can I use my yahoo email SMTP server with my login info to do it? And is this all I'd need to add to add the credentials?

smtp.Credentials = New NetworkCredential("MyUsername", "MyPassword")
(before the smtp.Send, of course)

View 4 Replies

Encryption/Decryption - Code To Encrypt A File->networkstream->Decrypt The File

Feb 28, 2011

I'm having trouble writing the code to encrypt a file->networkstream->Decrypt the file.. I've tried several ways, but I keep failing....

View 1 Replies

VS 2005 Possible To Be Able To Encrypt File / Have Application Be Able To Decrypt It And Amend File As Necessary

Mar 17, 2009

I would like to know if it is possible to be able to encrypt a file and have my application be able to decrypt it and ammed the file as necessary. and then when the program exits it will encrypt the file back up.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved