From 56bcf39fcf4adb42aa4afda3f55a6cab9ccf7a8d Mon Sep 17 00:00:00 2001 From: OsCoder Date: Mon, 17 Aug 2026 09:24:47 +0200 Subject: Started with basic system layout --- ms_core/system_id.v | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ms_core/system_id.v (limited to 'ms_core/system_id.v') diff --git a/ms_core/system_id.v b/ms_core/system_id.v new file mode 100644 index 0000000..4413b75 --- /dev/null +++ b/ms_core/system_id.v @@ -0,0 +1,17 @@ +module ms_core + +import crypto.rand + +pub struct SystemId { +mut: + base [16]u8 +} + +pub fn get_new_system_id() !SystemId { + bytes := rand.bytes(16) or { panic('Could not retireve 16 randrom bytes for system_id!') } + mut base := [16]u8{} + copy(mut base, bytes) + return SystemId{ + base: base + } +} -- cgit v1.2.3