Search:

Type: Posts; User: javapenguin

Search: Search took 0.24 seconds.

  1. Replies
    6
    Views
    2,135

    Re: Decryption problem

    d = (char) ((c+key-97)%26+97);


    Will add c to key and then subtract 97.

    Will then divide value in parenthesis by 26 and add 97 to the remainder of that division and then make the whole thing...
  2. Replies
    6
    Views
    2,135

    Re: Decryption problem

    int c = input.charAt(i);

    Probably should be

    int c = (int) input.charAt(i);

    Otherwise you're setting an int to a char value.

    And I don't mean that it'll do that. It can't, but you're...
  3. Replies
    6
    Views
    2,135

    Re: Decryption problem

    Well, I've found that it can work the way you did it. However, maybe something is being defined inside one of your loops that should be defined outside, as its value is getting lost before you...
  4. Replies
    6
    Views
    2,135

    Re: Decryption problem

    Well, it looks like you're adding a char to a String. Try type casting it to a String or something.

    It's because you're adding a char to a String that's causing the problem I think.
Results 1 to 4 of 4