finish file server

This commit is contained in:
marlonerler
2024-07-04 16:11:02 +02:00
parent 8fa8bc6ed0
commit c97e3b5450
829 changed files with 143867 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import crypto from 'node:crypto';
function md5(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
return crypto.createHash('md5').update(bytes).digest();
}
export default md5;