input: Write a python function to implement a Caesar cipher for encrypting and decrypting messages using a given shift.
  assert CaesarCipher(3).encrypt('HELLO') == 'KHOOR'
  assert CaesarCipher(3).decrypt('KHOOR') == 'HELLO'
  assert CaesarCipher(1).encrypt('ABC') == 'BCD'
  assert CaesarCipher(1).decrypt('BCD') == 'ABC'
  assert CaesarCipher(5).encrypt('XYZ') == 'CDE'
  assert CaesarCipher(5).decrypt('CDE') == 'XYZ'
output: class CaesarCipher:
      def __init__(self, shift):
          self.shift = shift
  
      def encrypt(self, message):
          return self._transform(message, self.shift)
  
      def decrypt(self, message):
          return self._transform(message, -self.shift)
  
      def _transform(self, message, shift):
          result = []
          for char in message:
              if char.isalpha():
                  shift_base = ord('A') if char.isupper() else ord('a')
                  transformed_char = chr((ord(char) - shift_base + shift) % 26 + shift_base)
                  result.append(transformed_char)
              else:
                  result.append(char)
          return ''.join(result)