Skip to content

Instantly share code, notes, and snippets.

@epan
Created May 2, 2014 08:09
Show Gist options
  • Save epan/8bfe5f0899da6a607d2e to your computer and use it in GitHub Desktop.
Save epan/8bfe5f0899da6a607d2e to your computer and use it in GitHub Desktop.
pset 2 vigenere checking argument
// Allows only 1 keyword
if (argc != 2)
{
return 1;
}
ciphertext = argv[1];
cipherlength = strlen(ciphertext);
// Rejects ciphers with non-alpha content
for (int i = 0; i < cipherlength; i++)
{
if (!isalpha(ciphertext[i]))
{
return 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment