HomeОбразованиеRelated VideosMore From: Computer Science

Caesar Cipher C Program

90 ratings | 10487 views
Caesar cipher c program for lower case letters. Get the code here: https://github.com/randerson112358/C-Programs/blob/master/caesarCipher1.c See video on Viginere Cipher: https://www.youtube.com/edit?o=U&video_id=wJihluta5y0 Please Subscribe ! ►Become a Patreot: patreon.com/randerson112358 ►Website: http://everythingcomputerscience.com/ ►Support this channel on Patreon: https://www.patreon.com/randerson112358 ►Support this channel get a ceasar cipher decoder ring: https://www.amazon.com/gp/product/B004D1L0B0/ref=as_li_tl?ie=UTF8&tag=everythingc06-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B004D1L0B0&linkId=cfe36c7108193f5cccb323f480f2adf9
Html code for embedding videos on your blog
Text Comments (10)
James Dempsey (4 months ago)
Great video and very helpful am stuck and not sure why. I enter my message and the encrypted message comes back as : The encrpted message is: , cypher, cypher, cypher, cypher, cypher Any help would be much appreciated.
UnboxModz (7 months ago)
damn how many years have you been reading about c?
Al Wa (6 months ago)
makes sense. suddenly i dont feel as bas
Computer Science (7 months ago)
I first started learning C-Programming about 10 years ago.
Dramenable (8 months ago)
Que buen video wey la neta te rifas un chingo, a huevo necesitaba esto para entregar un proyecto y tu explicas bien vergas, dices paso a paso todo y eso esta bien chingon we la neta te dejo un pinche likesote a la verga eres la verga jalate a la verga compa fierro pariente cero miedo si o no compa la neta al chile pelon si wey
Đhaяʍaηgツ (11 months ago)
can u plzz zoom in a bit cause am watching on a 5.5 inch and still cant see btw lol 😂
Oliver Bolton (1 year ago)
I tried this and my output just cycles through the characters for example "hello" came out as "ellox" any tips?
Computer Science (1 year ago)
Hi Oliver, You tried this exact code and got "ellox" from "hello" ?
why do you use fgets instead of scanf? is there a difference
Computer Science (1 year ago)
There is a difference, I am using it to be able to read in a line of text such as "hello world notice the space". You can not scan in the whole string using scanf just the "hello" portion will be read. But if you just want to scan in one string like "hi" then you can use the scanf function and will have to change the caesarCipher function to the following: Note: All I did is delete the '-1' from the while loop. void caesarCipher(char* plainText, int key){ int i=0; int cypherValue; char cypher; while( plainText[i] != '\0' && strlen(plainText) > i){ cypherValue = ((int)plainText[i] -97 + key) % 26 + 97; cypher = (char)(cypherValue); printf("%c", cypher); i++; } printf("\n"); } Thanks for watching and the comment!

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.