예제 #1
0
 async def convert_int_to_uuid(self, i: int) -> str:
     UUID_bytes = i.to_bytes(length=16, byteorder="big")
     UUID_data = NSData.alloc().initWithBytes_length_(
         UUID_bytes, len(UUID_bytes))
     UUID_cb = CBUUID.alloc().initWithData_(UUID_data)
     return UUID_cb.UUIDString()
예제 #2
0
 async def convert_uuid_to_int(self, _uuid: str) -> int:
     UUID_cb = CBUUID.alloc().initWithString_(_uuid)
     UUID_data = UUID_cb.data()
     UUID_bytes = UUID_data.getBytes_length_(None, len(UUID_data))
     UUID_int = int.from_bytes(UUID_bytes, byteorder="big")
     return UUID_int