mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-03 13:09:29 +08:00
15 lines
370 B
Text
15 lines
370 B
Text
/*
|
|
Copyright 2018 Google LLC
|
|
|
|
Use of this source code is governed by an MIT-style
|
|
license that can be found in the LICENSE file or at
|
|
https://opensource.org/licenses/MIT.
|
|
*/
|
|
|
|
import crypto from 'crypto';
|
|
|
|
export function getStringHash(input: crypto.BinaryLike): string {
|
|
const md5 = crypto.createHash('md5');
|
|
md5.update(input);
|
|
return md5.digest('hex');
|
|
}
|