<?php

class Cipher
{
  /**
   * @param char $char
   * @return char
   */
  protected function encrypt_char($char)
  {
    return $char;
  }

  /**
   * @param char $char
   * @return char
   */
  protected function decrypt_char($char)
  {
    return $char;
  }

  /**
   * @param string $text
   * @return string
   */
  public function encrypt($text)
  {
    $encrypted = "";
    foreach(str_split($text) as $char)
      $encrypted .= $this->encrypt_char($char);
    return $encrypted;
  }

  /**
   * @param string $encrypted
   * @return string
   */
  public function decrypt($encrypted)
  {
    $text = "";
    foreach(str_split($encrypted) as $char)
      $text .= $this->decrypt_char($char);
    return $text;
  }
}


