A Caesar cipher is a trivial method to obfuscate text by substituting each character with it successor (or nth successor). Use this tag for questions involving a Caesar cipher or toy-grade ciphers of similar design.
6
votes
2answers
45 views
Encrypter - Double Vigenere Cipher in Python
I wrote this encrypter based on the idea of a Vigenere cipher, but instead of using only one key, it "makes" another key from the existing key. The length of the second key also depends on the ...
3
votes
3answers
78 views
Encode a string using Caesar's Cipher
My program is complete and running, but I would like second opinions on how I can make it more efficient. The program prompts the user for the message and the amount s/he would like to shift the ...
5
votes
1answer
49 views
Caesar Cipher encryptor using ASCII
I have built a Caesar Cipher in Ruby that utilizes ASCII for the encryption. I am not sure whether or not this was the best way to go about the task but this way made the most sense to me. Please give ...
-2
votes
0answers
38 views
A short and a readable implementation of Caesar cipher [closed]
I have a few lines of code for making a rotated string for a Caesar cipher and just for fun I am trying to condense them into one. Obviously this is pointless since it is completely unreadable but I'm ...
2
votes
1answer
71 views
Caesar cipher brute force
I have code that uses the brute force technique to find the message to a Caesar cipher. The program decrypts the message using different keys and then checks whether the resulting words are contained ...
4
votes
1answer
99 views
Custom encryption algorithm, “SBC”
I decided to roll out my own encryption algorithm, which I am calling "SBC" or Simple Byte Cipher. Essentially, I just take the bytes of the string data, do a Caesar cipher like shift to it, increment ...
4
votes
1answer
36 views
Vigenère cipher encryption in Scala
I've worked out a functioning Vigenère encryption in Scala, and while it doesn't seem like my code is too hideous, I'm sure I could make it more functional and Scala-esque. Primarily, it seems like:
...
1
vote
0answers
27 views
Monoalphatic and Polialphabetic cipher in Ruby
This code encrypts a text with mono-alphabetic and poli-alphabetic substitutions ciphers.
For further info see:
Mono-alphabetic/Caesar Cipher
Poli-alphabetic cipher
...
5
votes
1answer
41 views
Simple substitution encryption with Scala
I've just started teaching myself Scala to get my feet wet with functional programming, and I'm messing with around with some classical cryptography. The following code produces monoalphabetic simple ...
4
votes
1answer
60 views
Monoalphabetic Substitution Cipher
In light of this months Community Challenge, I've taken a stab at building something related. Keep in mind, this isn't a submission for the challenge, just a utility to help in the later process of ...
4
votes
3answers
642 views
Caesar Cipher encryption/decryption
This program takes a command line argument of how many times you would like to encrypt plain text. After you compile the program, input a message you would like to have coded. I'm new to C and ...
5
votes
5answers
3k views
Implementing Caesar Cipher in C
I am trying to implement a "Caeser cipher" to every lower case character in a string, by using a number to control the amount of character rotation. Here is an algorithm that I came up with. Can you ...
2
votes
1answer
86 views
Caesar Cipher implementation - Odin Project
I am going through the Odin Project Ruby section, and just finished implementing a Caesar cipher interpretation. Should I use classes, or more than one method to distribute the flow? Is there really ...
1
vote
1answer
113 views
ROT13 algorithm in C
I am trying to learn C and I came across the ROT13 scrambling system used to store some passwords.
Assuming the user types everything in correctly (uses 1 argument, uses a string not an int, etc.) ...
2
votes
1answer
136 views
Ignoring the effect of a space when applying encryption
I am writing an encryption program that will encrypt the message "STOP POLLUTION" with the encryption function f(p) = (3p + 7) mod 26 where p is given letter.
Here is my code for doing so (tested it ...
4
votes
1answer
71 views
Readable Caesar cipher
I was trying to refactor the following code for Caesar cipher, but it feels overly complicated at the end of the refactoring. Could someone else take a look at it and let me know if I am just ...
10
votes
3answers
1k views
Simple “secret message” decoder program
Since I am new to Java, I wanted to see if there were better ways of answering the same question. Are parts of my code redundant or maybe there's an easier way to get the same result?
Problem J4: Big ...
4
votes
2answers
287 views
Smartly encrypting strings
I am trying to encrypt the input string using the following rule:
1st Character of string will be increment by 4 ( a will become e )
2nd Character of string will be increment by 1 ( a will become b ...
3
votes
2answers
99 views
2
votes
3answers
310 views
A Cipher with 2 methods for encryption/decryption
I'd like advice on how this could be written more efficiently, idiomatically, or just anything that could be improved upon.
I'd also like to know if there's an alternative to my ...
2
votes
1answer
107 views
Caesar cipher mod 127 with cyclical keys
This is my code for encryption and decryption when the key = 'a'. I'm just a little confused on how to make it work when the key contains multiple characters, key = 'abc' for example. If anyone could ...
4
votes
1answer
309 views
Caesar decipher
I have recently started learning Python and one of the assignments I have been working on is a Caesar decipher.
Can you tell me how I can make my code better?
...
3
votes
1answer
1k views
Defining functions in Vigenere cipher
I'm trying to learn the process of defining/calling a (somewhat) complex function.
I understand the main idea, and can do it on a small (simple) scale.
A simple example:
...
2
votes
2answers
2k views
Enhance a Caesar cipher
I have just written a simple program to implement the Caesar cipher using lists. The program assumes the input will be all capital letters. I'm quite new to Python and am just curious of some more ...
6
votes
2answers
346 views
Caesar cipher with GUI
I have created a functional Caesar cipher in Python 3 and I have implemented a GUI using Tkinter.
...
5
votes
3answers
1k views
Caesar cipher exercise
I was doing this exercise from here. I made a solution work but can't help feel it could have been done in fewer lines. I'm quite new to python so I'm not too sure of the little shortcuts.
...
5
votes
1answer
129 views
Increase the speed of this Caesar Cipher
Here's my attempt at a Caesar Cipher encoder/decoder.
If given a key, it will encrypt the given string. However, if you do not specify a key, it checks each of the 26 possible keys and returns the ...
10
votes
5answers
1k views
Caesar cipher cracker
How can I refactor this with less code? This is homework and is cracking a Caesar cipher-text using frequency distribution.
I have completed the assignment but would like it to be cleaner.
...
5
votes
1answer
262 views
Brute force Caesar Cipher decrypter
I wrote the following that tries to crack a message that was encrypted via a simple Caesar cipher through brute force. I'm fairly new to Haskell, so any and all input is appreciated.
Because there are ...
6
votes
3answers
835 views
Learning Ruby Caesar Cipher
I am trying to learn Ruby and made a simple Caesar cipher program and I was wondering if the following code follows the 'ruby way' or the way most ruby users would do it
...
3
votes
1answer
106 views
Haskell encryption tips
I wrote a variation of the Caeser Cipher and would like some feedback.
Is it idiomatic? Can you generally see anything that can be improved?
Use example:
...
6
votes
3answers
3k views
Simple Caesar shifter in C#
I use these in a windows form with fun buttons, I wanted to see what the world thinks of my coding.
This is something that I coded about 2-3 years ago, I did change some of the coding when I looked ...
1
vote
1answer
179 views
Substitution Cipher in Haskell
Learn You a Haskell presents the Caesar Cipher:
The Caesar cipher is a primitive method of encoding messages by
shifting each character in them by a fixed number of positions in the
alphabet
...
4
votes
1answer
189 views
Little script to Caesar shift strings
I wrote a little Perl script to Caesar shift strings. Usage:
...
1
vote
1answer
1k views
Caesar cipher implementation
I am not very familiar with JavaScript and I'am a little confused with the object oriented peculiarities of it. I am trying to create a Caesar shift using the concepts of objects, methods and ...
10
votes
2answers
1k views
How can I improve this Caesar encryption?
I have the following method which encrypts a english text, given the plain text and the desired key:
...
3
votes
2answers
1k views
Vigenere square cypher decryption
I'm in the process of learning python and programmed this exercise in decrypting the Vigenere square cypher as practice.
Please comment on best practices, efficiency, or more pythonic ways to do ...
10
votes
3answers
784 views
Caesar Cipher that takes an arbitrary offset
This Caesar cipher can take any integer and it will wrap around the correct number of times and still perform the encryption/decryption.
Let's say we have a text file named ...
15
votes
4answers
1k views
Reading and writing data for Caesar cipher
I am struggling with commenting and variable naming. My teacher says my comments need to be more explanatory and explicit. He says my variable names are also sometimes confusing. I was just wondering ...
6
votes
2answers
3k views
Caesar cipher in Ruby
I must implement a simple Caesar cipher class. Initializer takes two parameters - number of positions to shift the alphabet (integer) and the alphabet used (as string, not necessarily the standard ...
2
votes
3answers
2k views
Python Caesar's Cipher: How could I do it better?
I wrote this looping Caesar's Cipher with a default key; I'd love for some input on how I could make this operate better/more effectively.
...
4
votes
3answers
3k views
Replacing every letter in a string with the letter following it in the alphabet
I am working through some of the exercises at Coberbyte. The instructions for this exercise are to replace every letter in a string with the letter following it in the alphabet (i.e., c becomes d, z ...
2
votes
2answers
181 views
Implementing an encryption standard over message text
I wrote the below code and tested some example files on it. I didn't find any errors, but I still want to be thorough about this.
Also, any suggestions in improving the code?
...
2
votes
2answers
230 views
Shorten this Caesar Cipher cracker
My program has to decrypt ciphertext. It has to try all possible 26 shifts and store each in an array so that I calculate the frequencies of each array and find the highest frequency, in which that ...
4
votes
1answer
1k views
Alternated Caesar Cipher
I've recently picked up PHP, for the first assignment in my IT-security class I decided to code it in PHP.
The algorithm is an alternation of the Caesar cipher, instead of using a fixed number to ...
5
votes
2answers
228 views
Rot47 an NSString Category
As a Java native, I am always a little worried when doing Objective-C because of memory leaks and pointers flying at my head...
All comments are welcome on the ...
4
votes
1answer
431 views
My first Go program: Caesar Cipher
I'm learning Go at this moment and it is my first program in Go, so I will be thankfull for any suggestion, remarks and observations.
...
8
votes
4answers
2k views
4
votes
3answers
4k views
ROT13 implementation
I'm doing some coding challenges to get better practiced at my coding. I'm trying to do one that requires us to do a ROT13. I've got the implementation correct, and I just want to know a couple of ...
14
votes
4answers
5k views