473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

VB Help with crypto program

HELP!!!!!

I have to write a program that does this:

Create a program that encrypts and decrypts a message...

Inputs: A typed message

Output: When the encrypt button is clicked the input message is encrypted. When the Decrypt button is clicked, the message is decrypted.

the encrypted button is clicked...this adds 1 to the ASCII value of a letter; therefore, if the word "Hello" is typed into the textbox, the letters "Ifmmp" would be displayed in the encrypt text box. The Decrypt button reverses the process by subtracting 1 from the ASCII value.

Additional Info: The program should include encrypt message, decrypt message, clear and exit buttons. their functionality is as follows:

The encrypt message button takes the message button takes the message entered into the first textbox. It then breaks the message down into its individual letters and converts it to ASCII. Once that is done, it adds one to the ASCII value and displays it in the second textbox.

The code to declare a char array and store the values from the first textbox is as follows:

Dim chrArray(() As Char = txtMessage.Text.ToCharArray

You will use a For Next loop to process every letter in the message. You will use 0 for the lower bound and chrArray.GetUpperBound(0) for the upper bound.

You will use the chr() and asc() functions to find the next higher ASCII value. Chr(Asc(chrArray(intCount)) + )

Once the new ASCII value is found, display it in the second textbox.

The dexrypt message button takes the encrypted message in the second textbox. It then breaks the message down into its individual letters and converts it to the third textbox.

When the Clear button is clicked, the program should clear data out of all 3 textboxes.

When the Exit button is clicked, the program should terminate.


The program should use error handling and display a message box containing the following text "ID10T Error" when an error is encountered.

Comments should be used to document how the program functions.

Evaluation Criteria:

1) All labels, textboxes and command button display the correct cation
2) The listbox and command buttons names use proper Hungarian notation and camel casing
3) The exit button terminates the program
4) The sclear button clears all textbox data before any new data is added
5) The encrypt message button correctly encrypts the input message
6) The decrypt message button correctly decrypts the encrypted message
7) Error handling functions correctly
8) Comments are used to document processing
9) Message box functions correctly
10) All text data is converted to the appropiate type

Heres what I have so far.....
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  4.        Handles Button1.Click
  5.              Dim strArray() As String + txtInput.Text.Split(",")
  6.              Dim intHold As Integer
  7.              Dim intX As Integer
  8.              Dim intY As Integer
  9.              Dim inArray(strArray.GetUpperBound(0)) As Integer
  10.              For intCount As Integer = 0 To strArray.GetUpperBound(0)
  11.                    intArray(intCount) = CType(strArray(intCount), Integer
  12.  
  13. Next
  14.  
  15.              'sort
  16.              For intX = 0 To intArray.GetUpperBound(0)
  17.                    For intY = 0 to intArray.GetUpperBound(0)
  18.                          If intArray(intX) < intArray(intY) Then
  19.                             intHold = intArray(intY)
  20.                             intArray(intY)  = intArray(intX)
  21.                             intArray(intX) = intHold
  22.                          End If
  23.                    Next
  24.              Next
  25.  
  26.                 Dim strOutput As String = ""
  27.                 For Each strItem As String In strArray
  28.                       strOutput & ","
  29.              Next
  30.  
  31.              txtOutput.Text = strOutput.Trim(",")
  32.              Next
  33.        End Sub   
  34. End Class
Something isn't right and I don't know what to do....By this what should the names of the buttons and boxes be....maybe I have that wrong? What would make it work?

Help me PLEASE>>>>

Angi Nelson

removed mail id
Mar 16 '08 #1
0 1231

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: wqhdebian | last post by:
As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can not generate the same key with the same input.Does...
1
by: akickdoe22 | last post by:
Please help me finish this program. i have completed the addition and the subtraction parts, but i am stuck on the multiplication and division. any suggestions, hints, code, anyhting. it's not a...
2
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to...
9
by: Lauren Wilson | last post by:
Hi Folks, We've been using Crypto ++32 to control licensed access to our widely distributed Access 2K app. Unfortunately, Sampson Multimedia appears to be out of business. Does anyone out...
13
by: Andy Chau | last post by:
I try to use RSA to implement the following scheme but wasn't sucessful. Sever encrypt a message using a public key, the client decrpyt the message using a private key. I don't want the client...
2
by: Leandro H. Delamare | last post by:
Hello group. I'm with a problem a few days with Smart Cards I Have an C++ DLL with some funcions to read a Smart Card. But the problem is, I have the declarations in C++ and a Program Example in...
1
by: Saper\(ek\) | last post by:
I need to encrypt some data in my program, so I've created 2 functions to encrypt and decrypt data. I've created a simple program to test it, and... it crashes. It wors ok on XP, but on win98 it...
2
by: ThunderMusic | last post by:
Hi, I encrypted a string using the RijndaelManaged class. When decrypted, it happens that the string is longer then the original, but the exceeding chars are nothing...
5
by: ~~~ .NET Ed ~~~ | last post by:
Anybody has any idea why this simple thing is not working? I pass a text file as input to encrypt it, then pass the encrypted version to the same function and get some garbled data not at all...
2
by: rayoflight | last post by:
This is how my test program works. Server will encrypt some text and sends it over to the client. The client will then decrypts it. However I have some problem decrypting it. When I play...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.