Questions tagged [vigenere]

Vigenere Cipher, one of the assignments in Problem Set 2. It's like Caesar Cipher, but with a twist.

Filter by
Sorted by
Tagged with
0
votes
2answers
15k views

How to Wrap Around Array Indexes?

I have the Vigenere encryption portion working properly, but can't seem to figure out how to wrap around argv[1] indexes. My first for loop declared two ints, i and j, and incremented each int with ...
0
votes
3answers
1k views

How to Ignore Ciphering Non-Alphabetical Characters in Vigenere?

I get these 3 errors when checking viginere with check50 :( encrypts "world, say hello!" as "xoqmd, rby gflkp!" using "baz" as keyword \ expected output, but not "xomqd, szz gflkp!\n" :( encrypts ...
1
vote
1answer
85 views

Sometimes the vigenere cipher went wrong but i can't figure out why~please help!

it compile like this: ~/workspace/pset2/ $ check50 2015.fall.pset2.vigenere vigenere.c :) vigenere.c exists :) vigenere.c compiles :) encrypts "a" as "a" using "a" as keyword :( encrypts "world, ...
2
votes
1answer
246 views

Expression result unused in Vigenere

I am getting this error: expression result unused and I don't know what that means. I use the code it's pointing to (green underline), just like I do in my Caesar cipher which works: The other posts ...
1
vote
1answer
153 views

Can't get the 'z' using % 26 on my Vigenère Cypher

I've been trying for a while to get this right but I guess I can't do the math. I'm using this line to encrypt each character for the Vigenères Cypher: int letter = ((p(i) - 96) + (k[j] - 97) % 26 + ...
0
votes
1answer
77 views

I am having trouble with the code vigenere

I still have a lot work to do. But for some reason if I type plaintext: b string s = a ciphertext: b0 I can't seem to find the error any hints would be appreciated. Please don't give away the ...
0
votes
1answer
327 views

Pset2, Vigenere error “\ expected output, not a prompt for input” when I run check50

I get this error when I run check50 ~/workspace/pset2/ $ check50 2016.vigenere vigenere.c :) vigenere.c exists :) vigenere.c compiles :( encrypts "a" as "a" using "a" as keyword \ expected output, ...
0
votes
1answer
807 views

Why does strlen of argv become zero in my code?

I was doing the Vigenere cipher and wanted to translate all the characters into ints 0-25 to be used as the key. I got floating point exception core dumped error. I did an inspection of my code and ...
0
votes
2answers
341 views

Transforming argv[1] into a string of integers

I tried to put argv[1] into a cycle: for (each argv[1][i]) int k[i] = atoi(argv[1][i]); // here... ...the compiler tells me to add '&' before argv to address; afterward, the compiler tells ...
0
votes
1answer
88 views

problem with “z” for vigenere

here is my code: #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int main(int argc, string argv[]) { if (argc != 2) ...
0
votes
1answer
151 views

cs50 pset2/vigenere - code doesn't work if text and key differ upper/lower case

I Don't know how to make code work if key is lowercase and text uppercase and vice-versa. Before I considered case sensitivity my code would work except for a few letters. Now it wont output full ...
0
votes
1answer
315 views

Vigenere fails check50 test encrypts “BaRFoo” as “CaQGon” using “BaZ” error

Vigenere fails check50 test encrypts "BaRFoo" as "CaQGon" using "BaZ" error, my program output is "caQGoh". I don't know what's the problem but i guess that this problem apears when there are ...
0
votes
1answer
4k views

null pointer passed as argument 1

I had written this function for argument checking but it is showing this type of error vigenere.c:26:20: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/...
-1
votes
1answer
328 views

Ignoring Non-Alphabetical chars in Vigenere [duplicate]

I do not control?? do so each independent encryption if uppercase text and key do this if key lowercase text and do this if uppercase - lowercase text and key do this if lowercase - uppercase text ...