This commit is contained in:
marlon-erler
2024-07-07 16:56:24 +02:00
parent b047f1b5e8
commit 87241bac45
119 changed files with 0 additions and 10050 deletions
-10
View File
@@ -1,10 +0,0 @@
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;