def pack(self):
<EOL>fmt = "<STR_LIT>" % (pyhsm.defines.UID_SIZE)<EOL>ts_high = (self.timestamp & <NUM_LIT>) >> <NUM_LIT:16><EOL>ts_low  =  self.timestamp & <NUM_LIT><EOL>res = struct.pack(fmt, self.user_id,self.use_ctr,ts_low, ts_high,self.session_ctr,self.rnd)<EOL>crc = <NUM_LIT> - crc16(res)<EOL>return res + struct.pack('<STR_LIT>', crc)<EOL>
Return contents packed. Only add AES ECB encryption and modhex to
get your own YubiKey OTP (see function 'from_key').