code: def mode_oath_hotp(self, secret, digits=6, factor_seed=None, omp=0x0, tt=0x0, mui=''):
          
          if not self.capabilities.have_OATH('HOTP'):
              raise yubikey_base.YubiKeyVersionError('OATH HOTP not available in %s version %d.%d' \
                                                     % (self.capabilities.model, self.ykver[0], self.ykver[1]))
          if digits != 6 and digits != 8:
              raise yubico_exception.InputError('OATH-HOTP digits must be 6 or 8')
  
          self._change_mode('OATH_HOTP', major=2, minor=1)
          self._set_20_bytes_key(secret)
          if digits == 8:
              self.config_flag('OATH_HOTP8', True)
          if omp or tt or mui:
              decoded_mui = self._decode_input_string(mui)
              fixed = yubico_util.chr_byte(omp) + yubico_util.chr_byte(tt) + decoded_mui
              self.fixed_string(fixed)
          if factor_seed:
              self.uid = self.uid + struct.pack('<H', factor_seed)
docs: Set the YubiKey up for OATH-HOTP operation.
  
          Requires YubiKey 2.1.