Пример #1
0
 def toString(self):
     hex = Utils.bin2hex(self.toBinary())
     if self.version != None:
         return hex[0:8] + "-" + hex[8:8 + 4] + "-" + int(
             self.version,
             16) + hex[13:13 + 3] + "-8" + hex[17:17 +
                                               3] + "-" + hex[20:20 + 12]
     return hex[0:8] + "-" + hex[8:8 + 4] + "-" + hex[
         12:12 + 4] + "-" + hex[16:16 + 4] + "-" + hex[20:20 + 12]
Пример #2
0
 def toString(self):
     hex = Utils.bin2hex(self.toBinary())
     if self.version != None:
         return Utils.substr(hex, 0, 8) + "-" + Utils.substr(
             hex, 8, 4) + "-" + int(self.version, 16) + Utils.substr(
                 hex, 13, 3) + "-8" + Utils.substr(
                     hex, 17, 3) + "-" + Utils.substr(hex, 20, 12)
     return Utils.substr(hex, 0, 8) + "-" + Utils.substr(
         hex, 8, 4) + "-" + Utils.substr(hex, 12, 4) + "-" + Utils.substr(
             hex, 16, 4) + "-" + Utils.substr(hex, 20, 12)