private function base64Decode($char)
    {
        if (!array_key_exists($char, $this->charToInt)) {
            throw new \Exception('Not a valid base 64 digit: '.$char);
        }

        return $this->charToInt[$char];
    }