Search Result

Collapse
2 results in 0.0022 seconds.
Keywords
Members
Tags
caesar
  •  

  • barks33
    started a topic Ceasar Cipher help

    Ceasar Cipher help

    Hi all, im writing a caesar cipher and ive done most of the program (see below)
    Code:
    def decrypt(ciphertext, shift):
        decrytped_text = " "
    
    
        for letter in ciphertext:
            if letter.isalpha():
                num = ord(letter)
                num += key
    
                if letter.isupper():
                    if num > ord('Z'):
                        num -= 26
    ...
    See more | Go to post
    Last edited by bvdet; Apr 7 '10, 06:01 AM. Reason: Add code tags

  • googleplexx
    started a topic Help with a simple encryption program?
    in Java

    Help with a simple encryption program?

    Hello,

    I'm trying to make a simple Caesar cipher however instead of A-Z i want to also include 0-9. where 9 wraps back to A.

    The best i could can do shift letters and integers independently so a string like "TESTING SHIFT Z 9" with a key of 1
    becomes
    "UFTUJOH TIJGU A 0"

    9 wraps to 0 and Z wraps to A

    here is how I did that:

    Code:
        private
    ...
    See more | Go to post
Working...