Lines Matching refs:bytes

38     # get the raw 16 bytes of the UUID
39 >>> x.bytes
43 >>> uuid.UUID(bytes=x.bytes)
62 string of 16 raw bytes as an argument named 'bytes', or a tuple of
69 bytes the UUID as a 16-byte string
98 def __init__(self, hex=None, bytes=None, fields=None, int=None,
101 a string of 16 bytes as the 'bytes' argument, a tuple of six
112 UUID(bytes='\x12\x34\x56\x78'*4)
116 Exactly one of 'hex', 'bytes', 'fields', or 'int' must be given.
119 overriding bits in the given 'hex', 'bytes', 'fields', or 'int'.
122 if [hex, bytes, fields, int].count(None) != 3:
123 raise TypeError('need just one of hex, bytes, fields, or int')
130 if bytes is not None:
131 if len(bytes) != 16:
132 raise ValueError('bytes is not a 16-char string')
133 int = long(('%02x'*16) % tuple(map(ord, bytes)), 16)
191 bytes = ''
193 bytes = chr((self.int >> shift) & 0xff) + bytes
194 return bytes
196 bytes = property(get_bytes)
335 bytes = map(ord, status.adapter_address)
336 return ((bytes[0]<<40L) + (bytes[1]<<32L) + (bytes[2]<<24L) +
337 (bytes[3]<<16L) + (bytes[4]<<8L) + bytes[5])
376 return UUID(bytes=_buffer.raw).node
381 return UUID(bytes=_buffer.raw).node
424 return UUID(bytes=_buffer.raw)
447 hash = md5.md5(namespace.bytes + name).digest()
448 return UUID(bytes=hash[:16], version=3)
456 return UUID(bytes=_buffer.raw)
461 return UUID(bytes=os.urandom(16), version=4)
464 bytes = [chr(random.randrange(256)) for i in range(16)]
465 return UUID(bytes=bytes, version=4)
470 hash = sha.sha(namespace.bytes + name).digest()
471 return UUID(bytes=hash[:16], version=5)