3 Replies - 859 Views - Last Post: 13 August 2009 - 03:23 AM Rate Topic: -----

#1 Jay93  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 93
  • Joined: 04-August 09

simple encryption / decryption program does not process

Posted 13 August 2009 - 01:45 AM

This is for a simple encryption / decryption program. However when I run this the program does nothing and doesnt respond. Any ideas on what might be going wrong?

	 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

		Dim decryptedtext As String
		Dim encryptedtext As String
		Dim k As Int16

		encryptedtext = TextBox1.Text


		While k < encryptedtext.Length

			k = 0
			decryptedtext = decryptedtext + Chr(Asc(encryptedtext(k)) - 2)
			k = k + 1

		End While

		TextBox2.Text = decryptedtext

	End Sub


Is This A Good Question/Topic? 0
  • +

Replies To: simple encryption / decryption program does not process

#2 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5313
  • View blog
  • Posts: 27,213
  • Joined: 10-May 07

Re: simple encryption / decryption program does not process

Posted 13 August 2009 - 02:02 AM

** Renamed title to be more descriptive **
Was This Post Helpful? 0
  • +
  • -

#3 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2262
  • View blog
  • Posts: 9,466
  • Joined: 29-May 08

Re: simple encryption / decryption program does not process

Posted 13 August 2009 - 02:59 AM

Question for you Jay93 will k < encryptedtext.Length ever be False? Check your algorithm.

This post has been edited by AdamSpeight2008: 13 August 2009 - 03:00 AM

Was This Post Helpful? 0
  • +
  • -

#4 Jay93  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 93
  • Joined: 04-August 09

Re: simple encryption / decryption program does not process

Posted 13 August 2009 - 03:23 AM

View PostAdamSpeight2008, on 13 Aug, 2009 - 01:59 AM, said:

Question for you Jay93 will k < encryptedtext.Length ever be False? Check your algorithm.


Ah I see, what a stupid thing to have missed.

Thanks :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1