mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
perf: 流水线同一个阶段任务优化为并行执行
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import crypto from 'crypto';
|
||||
import crypto, { BinaryToTextEncoding } from 'crypto';
|
||||
|
||||
function md5(data: string) {
|
||||
return crypto.createHash('md5').update(data).digest('hex');
|
||||
function md5(data: string, digest: BinaryToTextEncoding = 'hex') {
|
||||
return crypto.createHash('md5').update(data).digest(digest);
|
||||
}
|
||||
function sha256(data: string) {
|
||||
return crypto.createHash('sha256').update(data).digest('hex');
|
||||
function sha256(data: string, digest: BinaryToTextEncoding = 'hex') {
|
||||
return crypto.createHash('sha256').update(data).digest(digest);
|
||||
}
|
||||
|
||||
function base64(data: string) {
|
||||
|
||||
Reference in New Issue
Block a user