docs: def decode(self, covertext):
          """Given an input string ``unrank(X[:n]) || X[n:]`` returns ``X``.
          """
  
          if not isinstance(covertext, str):
              raise InvalidInputException('Input must be of type string.')
  
          insufficient = (len(covertext) < self._fixed_slice)
          if insufficient:
              raise DecodeFailureError(
                  "Covertext is shorter than self._fixed_slice, can't decode.")
  
          maximumBytesToRank = int(math.floor(self.getCapacity() / 8.0))
  
          rank_payload = self._dfa.rank(covertext[:self._fixed_slice])
          X = fte.bit_ops.long_to_bytes(rank_payload)
  
          X = string.rjust(X, maximumBytesToRank, '\x00')
          msg_len_header = self._encrypter.decryptOneBlock(
              X[:DfaEncoderObject._COVERTEXT_HEADER_LEN_CIPHERTTEXT])
          msg_len_header = msg_len_header[8:16]
          msg_len = fte.bit_ops.bytes_to_long(
              msg_len_header[:DfaEncoderObject._COVERTEXT_HEADER_LEN_PLAINTEXT])
  
          retval = X[16:16 + msg_len]
          retval += covertext[self._fixed_slice:]
          ctxt_len = self._encrypter.getCiphertextLen(retval)
          remaining_buffer = retval[ctxt_len:]
          retval = retval[:ctxt_len]
          retval = self._encrypter.decrypt(retval)
  
          return retval, remaining_buffer