()
| 834 | _last_counter_v7 = 0 # 42-bit counter |
| 835 | |
| 836 | def _uuid7_get_counter_and_tail(): |
| 837 | rand = int.from_bytes(os.urandom(10)) |
| 838 | # 42-bit counter with MSB set to 0 |
| 839 | counter = (rand >> 32) & 0x1ff_ffff_ffff |
| 840 | # 32-bit random data |
| 841 | tail = rand & 0xffff_ffff |
| 842 | return counter, tail |
| 843 | |
| 844 | |
| 845 | def uuid7(): |
no outgoing calls
no test coverage detected
searching dependent graphs…