implement connection between servers

This commit is contained in:
marlonerler
2024-07-05 16:04:12 +02:00
parent 979657508b
commit dd5d1b7e26
113 changed files with 6062 additions and 113 deletions
+10
View File
@@ -0,0 +1,10 @@
import crypto from 'node:crypto';
function sha1(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
return crypto.createHash('sha1').update(bytes).digest();
}
export default sha1;