Questions tagged [caesar-cipher]

A very simple cipher in which the letters of the alphabet are substituted by a different letter that have a fixed distance to the original letter.

A very simple cipher in which the letters of the alphabet are substituted by a different letter that have a fixed distance to the original letter.

Named after Julius Caesar, because he is said to have used it.

788 questions
-2
votes
2 answers

Basic Caesars Code; encrypt string. Please explain what i did :D

The task is to encrypt the sentence: " My hovercraft is full of eels." I missed the exercise class due to other duties ;) Anyway i came to an result made of sniplets i found on the internet and a bit of experimenting. it goes as follows: #include…
Twizzler
  • 11
  • 2
-2
votes
4 answers

Caesar cipher object oriented programming

I have been implementing the Caesar cipher using object oriented programming. The problem is that when I call the encrypted function I get the same message as the user input... The message is not being encrypted properly. For example if I write…
Ketnav
  • 1
  • 3
-2
votes
1 answer

Anyway to shorten this Python Caesar Cipher code into fewer lines?

def encrypt(text, key, direction): if direction == 1: #The direction is either -1, or 1. If it is 1, it goes right. Otherwise, it will go left. emptys='' for x in text: b = ord(x) #b is the individual characters after…
-2
votes
3 answers

Console Output displaying random "u" for Caesar cipher

I'm creating a basic caesar cipher encryption/decryption. I'm having an issue where a random "u" is appearing instead of a space.. Any not sure how to correct this, any advice would be very much appreciated. // Decryption Method // static void…
-2
votes
1 answer

Read In External File Then Display After Caesar Shift

Blockquote I've have successfully gotten my code to read in the text from an external file and display it. I've also got code for a simple Caesar shift. I just don't know how to get my code to read in the file and then perform the Caesar shift and…
-2
votes
1 answer

Difficulty with caesar cipher

I created a program which takes a 'word' and a num parameter as the shifting number. Example if the string is Caesar Cipher and num is 2 the output should be Ecguct Ekrjgt. But I want the punctuation, spaces, and capitalization to remain intact.…
Hassan Yousuf
  • 751
  • 6
  • 12
  • 24
-2
votes
3 answers

Caesar's Cipher in C

I'm trying to do a program that receives an array of characters as input and each letter is replaced by another. On the following code, I only consider one change ('a'-->'h'), but as soon as the program works for that change, I will implement the…
cooper
  • 23
  • 3
-2
votes
2 answers

Caesar Cipher is not working with spaces

I'm having a hard time getting spaces to display properly. The following is an output of what is printed: ./CaeserC 13[A Encrypt message by 13[A spaces Please insert your message: Hello World Your message is: Hello World Your encrypted message…
TomMonTom
  • 45
  • 7
-2
votes
1 answer

Caesar Cipher issue

I am trying to implement a Caesar cipher. I have tried to return message in the function, but I get an error message (outside function). Can anyone help, please? Thanks in advance cat cate catec catecv message = input("type message ") shift =…
Wayne Askey
  • 13
  • 1
  • 4
-2
votes
2 answers

What is wrong in this implementation of Caesar Cipher?

I am trying to implement the Caesar cipher but I'm not getting the expected output. What's wrong with the code? Key: 3 Input: Hello Output I'm getting: KNUUX Expected Output: KHOOR Code: #include #include #include…
-3
votes
1 answer

Caesar: Checking the key

I am trying to check the key of the cipher text to see if every character is an integer. The code When I compile the program I get the following error code compiling error
-3
votes
1 answer

Python caeser cipher function

I want to write a python function that automatically finds the key of any encrypted text and decrypt the text. I want to use the caesar cipher encryption algorithm. This code is such that, you will enter the rot but I want the code to be able to…
Gibson
  • 1
  • 3
-3
votes
1 answer

How can I decrypt a string and get the algorithm used for the encryption

I want to know how to decrypt a text without knowing the key used or the algorithm such as this…
-3
votes
1 answer

How to encrypt plaint text to cipher text using PN Sequence?

I am trying to create a function that encrypts plain text to cipher text using PN sequence. But I am clueless how to do it. Is someone has any kind of algorithms that can help me in creating a function that can help me to build encryption function.
WOZNIK
  • 144
  • 4
  • 14
-3
votes
1 answer

How can I write an ASCII Caesar cipher in Python

I'm a complete beginner and have been tasked with creating a piece of code that asks the user to input a string asks the user to input a value between 1 and 25 which can be used as the ascii shifter output their string input based on the value they…
Paul
  • 1