code: def parse_result(self, data):
          
          # typedef struct {
          #   uint8_t nonce[YSM_AEAD_NONCE_SIZE]; // Nonce (publicId for Yubikey AEADs)
          #   uint32_t keyHandle;                 // Key handle
          #   YSM_STATUS status;                  // Status
          #   uint8_t numBytes;                   // Number of bytes in AEAD block
          #   uint8_t aead[YSM_AEAD_MAX_SIZE];    // AEAD block
          # } YSM_AEAD_GENERATE_RESP;
  
          nonce, \
              key_handle, \
              self.status, \
              num_bytes = struct.unpack_from("< %is I B B" % (pyhsm.defines.YSM_AEAD_NONCE_SIZE), data, 0)
  
          pyhsm.util.validate_cmd_response_hex('key_handle', key_handle, self.key_handle)
  
          if self.status == pyhsm.defines.YSM_STATUS_OK:
              pyhsm.util.validate_cmd_response_nonce(nonce, self.nonce)
              offset = pyhsm.defines.YSM_AEAD_NONCE_SIZE + 6
              aead = data[offset:offset + num_bytes]
              self.response = YHSM_GeneratedAEAD(nonce, key_handle, aead)
              return self.response
          else:
              raise pyhsm.exception.YHSM_CommandFailed(pyhsm.defines.cmd2str(self.command), self.status)
docs: Returns a YHSM_GeneratedAEAD instance, or throws pyhsm.exception.YHSM_CommandFailed.