def __init__(self, key=None, mode=None, initialization_vector=None, **kwargs):
    """Initializes the decrypter object.

    Args:
      key: optional binary string containing the key.
      mode: optional mode of operation.
      initialization_vector: optional initialization vector. (defaults to 0)
      kwargs: a dictionary of keyword arguments depending on the decrypter.

    Raises:
      ValueError: when key is not set or, the key or initialization vector size
                  is not supported.
    """
    if not key:
      raise ValueError(u'Missing key.')

    if len(key) not in DES3.key_size:
      raise ValueError(u'Unsupported key size.')

    if initialization_vector is not None:
      if len(initialization_vector) != DES3.block_size:
        raise ValueError(u'Unsupported initialization vector size.')
    else:
      initialization_vector = 0

    if not mode:
      raise ValueError(u'Missing mode of operation.')

    if mode not in self.ENCRYPTION_MODES:
      raise ValueError(u'Unsupported mode of operation: {0:s}'.format(mode))

    mode = self.ENCRYPTION_MODES[mode]

    super(DES3Decrypter, self).__init__()
    self._des3_cipher = DES3.new(key, mode=mode, IV=initialization_vector)
dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/encryption/des3_decrypter.py/DES3Decrypter.__init__/original