Results 1 to 2 of 2
  1. #1
    ekay90 is offline Member
    Join Date
    Jan 2013
    Posts
    6
    Rep Power
    0

    Post How do I encrypt a message that is input by the user?

    I need to take a message that is input by the user, store it in memory as an encrypted text using Caesar Cipher, where the user selects a shift key number and the message is encrypted according to that key. ie. the message looks jumbled.

    When the user wants to view this message, he/she needs to input that shift key and then the message will display in its normal state.

    How can I store that message in memory (probably using an array) and then encrypt it using Caesar Cipher with the shift key that is entered by the user? And then how can I make sure it appears unjumbled when the user wants to view it by entering the correct shift key (upon prompt).

    Thank you.

  2. #2
    JBelg is offline Member
    Join Date
    Oct 2012
    Posts
    36
    Rep Power
    0

    Default Re: How do I encrypt a message that is input by the user?

    Let the user enter a string, take the char array from this string, shift the chars with the provided shift key and convert the char array back to a string.

Similar Threads

  1. User Input???
    By jonytek in forum New To Java
    Replies: 8
    Last Post: 01-13-2013, 02:52 PM
  2. user input on gui
    By JoePenguin in forum New To Java
    Replies: 5
    Last Post: 01-26-2012, 07:27 PM
  3. Error Message when reading an input file.
    By Deluyxe in forum New To Java
    Replies: 8
    Last Post: 04-26-2009, 04:02 PM
  4. Built-in User Popup message boxes ?
    By BobZ in forum AWT / Swing
    Replies: 2
    Last Post: 02-06-2009, 06:23 PM
  5. cant take input from user
    By new_1 in forum New To Java
    Replies: 6
    Last Post: 12-25-2007, 07:38 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •