MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_node_id

Function get_node_id

crates/stdlib/src/uuid.rs:10–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8 use uuid::{Context, Uuid, timestamp::Timestamp};
9
10 fn get_node_id() -> [u8; 6] {
11 match get_mac_address() {
12 Ok(Some(_ma)) => get_mac_address().unwrap().unwrap().bytes(),
13 // os_random is expensive, but this is only ever called once
14 _ => rustpython_common::rand::os_random::<6>(),
15 }
16 }
17
18 #[pyfunction]
19 fn generate_time_safe() -> (Vec<u8>, PyNone) {

Callers

nothing calls this directly

Calls 2

bytesMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected