From 931828dee50e32d17622d2e383be357e902d6213 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Thu, 16 Jul 2020 12:28:21 +0400 Subject: [PATCH] Add server ID generation example --- protocol-spec/core.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol-spec/core.md b/protocol-spec/core.md index c4ee47a..071832a 100644 --- a/protocol-spec/core.md +++ b/protocol-spec/core.md @@ -26,7 +26,8 @@ For starting we simply use JSON + Websockets. ### Server-part - hostname: `IPv4 / [IPv6] / dns-domain:` (for end-users use) -- server ID: static SHA256 hash string from 4096 characters (for internal protocol use) +- server ID: static SHA256 hash string from 4096 characters (for internal protocol use). + - Generation example (using Linux): `echo -n $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 4096 | head -n 1) | sha256sum` ### Username/Room alias/RoomID