I am trying to create a substitution cipher using Visual Basic. I am new to programming and struggling so would appreciate some support please.
The cipher should do the following:
- Ask the user for a message to encrypt.
- Ask the user for a key (or ask the system to generate a key, whichever is easier to code).
- Encrypt the message using the key.
- Return encrypted message.
Example:
- Message = hello
- Alphabet: "abcdefghijklmnopqrstuvwxyz"
- Key: "kxgtlmpqbwcnderfahjusviyoz"
- Return encrypted message.
The main parts that I need help with are 2 and 3. What I need to know is the steps (English or syntax) to solve this and then I can try coding it myself. If you have an example that will be great.
Note that I am not seeking help on how to create a Caesar Cipher. A Substitution Cipher here will replace each letter with another character (which is the key).
Thanks.