import { Singleton, Container, Scope, Inject } from "typescript-ioc";
const crypto = require('crypto');
const md5 = crypto.createHash('md5');
/**
 * CryptoUtils
 * @date 2021-05-27 10:00:39
 * @author 吴锋霖
 */

@Singleton
export class CryptoUtils {

    static md5(txt: string): string {
        return md5.update(txt).digest('hex')
    }
}