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
-3
votes
2 answers

C source code error in Caesar cipher

I've been trying to fix this source code for a long time but the compiler still shows error. #include #include #include #include #include int main(int argc, char* argv[]) { char ptext[40]; …
jigl
  • 1
-4
votes
1 answer

Python ValueError: chr() arg not in range(0x110000)

import enchant message_decrypt= input("Enter the message you want to decrypt: ") key= 0 def caesar_hack(message_decrypt,key): final_message="" d= enchant.Dict("en.US") f= d.check(message_decrypt) while f== False: for…
Anuj Dave
  • 3
  • 1
-4
votes
1 answer

Implement encodeCaesar

I have to Implement a static public method named "encodeCaesar" in the class "Functionality.java", which encodes a text using Caesar encryption and I am a complete novice in Java Signature: encodeCaesar(String s, int val) : String. The method gets…
Bala
  • 9
  • 4
-4
votes
2 answers

whats wrong in my version of caesar cipher? pset 2

The Caesar cypher encrypts text with user derfined key and text. In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It…
-4
votes
2 answers

How do I repeat words several times in Python?

I'm wanting to create a string that will, If Word 1 was CHEESE and Word 2 = HAM, create a string looking something like this... CHEESEHAMCHEESEHAMCHEESEHAMCHEESEHAM etc... I then want the ASCII values of each character to be taken and be used in a…
Liam
  • 1
  • 1
  • 3
-4
votes
2 answers

Caesar Cipher, Python

I've got this task for my python class that I am supposed to do, however I can't seem to print the end result. The aim of the task is to create a program that allows one to encrypt or decrypt using a offset of the users choice, it should then take…
-4
votes
1 answer

Cipher program — error: unused variable

I keep getting the following error: clang -ggdb3 -O0 -std=c99 -Wall -Werror vigenere.c -lcs50 -lm -o vigenere vigenere.c:29:14: error: unused variable 'key' [-Werror,-Wunused-variable] string key = GetString(); ^ 1 error generated. My…
ndjustin20
  • 105
  • 1
  • 4
  • 12
-4
votes
2 answers

Caesar Cipher program was working but now isn't(help please) - Python 3

I'm writing a Caesar Cipher code for a part of a controlled assessment. I built a fully functioning program and I thought I had it sussed but after changing a few things around I went to check back and everything has gone wrong! The code's quite…
-4
votes
1 answer

Julius Casear Decyption/Encryption, Encoding/Decoding Java Program

So in my program I am supposed to have a driver class and utility class. I have to write a program that uses the same type of Cryptography as Caesar did. For example a = f, b = g, c = h, and so on. In my driver class is where I am supposed to have…
whodywho
  • 3
  • 2
-4
votes
4 answers

Error: expected expression in else if statement

This is the error I am getting: test.c:110:21: error: expected expression else if(isupper(p_i)) ^ 1 error generated. In an else if statement towards the end of the code—"else if(isupper(p_i))"—the error is…
Adi Sivasankaran
  • 518
  • 3
  • 6
  • 20
-5
votes
1 answer

Decrypting Caeser Cipher in Python

I am trying to make a decrypt script for a Caeser cipher script to encrypt but can't get it to work. This is my encryption script: def encrypt(text,s): result = "" # traverse text for i in range(len(text)): char = text[i]…
user14001760
  • 1
  • 1
  • 4
-5
votes
1 answer

Looking for a direct opposite of modulo or % in C programming

Built a C program that encrypts things using a Caesar Cipher. It converts it to an alphabetic number (0 = a / 1 = b / 2 = c) and then converts it pack after moving by the number of characters specified by using a modulo operator. I am currently…
-5
votes
1 answer

How to code Caesar Cipher encryption using file in C

For Caesar cipher encryption, I have this code. This program uses text written by the user. But I want this to be read from a text file and run. #include #include #include void main() { int key,i; char [30]; …
-5
votes
1 answer

Basic questions

I am new to Java and this a very basic question. This is a very small part of the program. Here is what I have to do: User inputs a number (1-26) in keyLength as an encryption. If number is 1, secretletter would be a; if its 2 it would be b, and so…
Jay
  • 3
  • 6
-5
votes
1 answer

Program is not printing spaces and puncuation

This code is supposed to encipher text based off the command argument input key and print out the enciphered text. However it doesn't print spaces and punctuation. Can someone explain what is wrong? Example use: $ ./caesar 12 world, say…
1 2 3
52
53