summaryrefslogtreecommitdiff
path: root/server/hornchat.verification.safety.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/hornchat.verification.safety.js')
-rw-r--r--server/hornchat.verification.safety.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/hornchat.verification.safety.js b/server/hornchat.verification.safety.js
new file mode 100644
index 0000000..59ba8bd
--- /dev/null
+++ b/server/hornchat.verification.safety.js
@@ -0,0 +1,14 @@
+module.exports = (username) => {
+ let hex = require('crypto').createHash("sha256").update(Object.keys(keys[username]).map((i) => {
+ return keys[username][i];
+ }).map((i) => {
+ return JSON.stringify(i);
+ }).join("|")).digest("hex");
+
+ return {
+ raw: hex,
+ user: BigInt("0x" + hex).toString().substring(0, 60),
+ parts: BigInt("0x" + hex).toString().substring(0, 60).match(/.{1,5}/g),
+ colors: hex.substring(0, 36).match(/.{1,6}/g)
+ };
+} \ No newline at end of file