0

In vigenere.c i get two check50 errors with argv as "baz" and "Hax0r".

In the case of argv1 == "baz"

The error: all char are ok except for the chars in "say" word, that differs. In check50, oddly, presents its answer with "\n" in the end! which alarmed my for a possible check50 bug. Sandbox output

I tried to check my code by issuing the command: ./vigenere aaa and the check50 string "world, say hello!". And correctly i get the same string as inputted (a & A == 0). Now with ./vigenere aia, i can figure out if char "s" increments to be "a", and it does. From this i concluded that check50 is wrong. I'm I right? Do you agree?

In case of argv1 == "Hax0r2"

The error: In the terminal window I get an error in the last test of the check50, but this test does not appear in the sandbox! Is this possible or is a bug?

Check50 states that ":( rejects "Hax0r2" as keyword", but it does not, because i tried it, and it runs. Is this also a bug from check50?

Sorry for the lengthy questions, and my broken english :)

Cheers!

Luis

P.S. I can post the code if its necessary.

1 Answer 1

2

check50 has no bugs.

Your sandbox results show only one error 'szz' rather than 'rby' inside this string

Expecting the following on standard out — xoqmd, rby gflkp!\n ... but received the following on standard out instead — xoqmd, szz gflkp!

 world, say hello!
 bazba  zba zbazb
 =================
 xoqmd, rby gflkp!

You are doing this:

 world, say hello!
 bazbazbazbazbazb
 =================
 xoqmd, szz gflkp!

You are correctly skipping any non-alpha in the plaintext but you are still incrementing the key, because you have tied it to i which keeps incrementing even if the plaintext is non-alpha.

Think about incrementing j only when you use the key.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .