mirror of
https://github.com/certd/certd.git
synced 2026-04-29 08:47:24 +08:00
perf: 支持新版本LeCDN
This commit is contained in:
@@ -6,7 +6,12 @@ function md5(data: string) {
|
|||||||
function sha256(data: string) {
|
function sha256(data: string) {
|
||||||
return crypto.createHash('sha256').update(data).digest('hex');
|
return crypto.createHash('sha256').update(data).digest('hex');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function base64(data: string) {
|
||||||
|
return Buffer.from(data).toString('base64');
|
||||||
|
}
|
||||||
export const hashUtils = {
|
export const hashUtils = {
|
||||||
md5,
|
md5,
|
||||||
sha256,
|
sha256,
|
||||||
|
base64,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user