|
-
Oct 4th, 2006, 03:27 PM
#1
Thread Starter
Fanatic Member
[2005] String Conversions / BASIC encryption
Hello...
I'm creating my own encryption-of-sorts on my application. The application is VERY simplistic so I don't need any hugely complicated encryption.
Basically,
I want my program to automatically convert characters in a string. I already know the conversion method that I'm going to use I just need help with the syntax.
So, in plain english, what i need is code that will
For each letter in STRING.
Replace A with B (case statement?)
Until the end of the string.
Here's a basic example. Say I want to use the following encryption (we'll just use numbers for now, since there's only 10 of them).
User enters "1234567890" into a textbox and presses encrypt.
My application goes through the string, one character at a time and checks for the 'switching' rule. In this example i'll use
1 becomes 2
2 becomes 3
...etc...
9 becomes 0
0 becomes 1
So, in textbox two the "encrypted" string would be: 234567890
Can someone help me with code on this please? I"m a newbie and I think my theory works for what I want to do, just not sure the most efficient way to do this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|