Cryptography Algorithms

Caesar Cipher

  • Function takes plaintext (string) and key/shift (integer).
  • Output is the ciphertext.

Play Fair Cipher

  • Function takes plaintext (string) and key (string).
  • Output is the ciphertext.
  • Test keys: rats, archangel.

Hill Cipher

  • Function takes plaintext (string) and key matrix (array of integers) [predefined].
  • Output is the ciphertext.
  • Test keys provided [frid].

Vigenere Cipher

  • Function takes plaintext (string), key (string), and mode (bool).
  • Output is the ciphertext.
  • Modes: auto mode (true), repeating mode (false).
  • Test keys: pie (repeating mode), aether (auto mode).

Vernam Cipher

  • Function takes plaintext and key (both strings).
  • Output is the ciphertext.
  • Test key: SPARTANS.