angular 中使用md5加密

xiaoxiao2025-04-19  9

安装 ts-md5

npm install ts-md5 --save

在需要使用的component或者service中 import import {Md5} from 'ts-md5/dist/md5';

使用Md5中的 hashStr方法 源码

static hashStr(str: string, raw?: boolean): Int32Array | string; 比如 let password:string = '123123';   Md5.hashStr(password); 结果 : 4297f44b13955235245b2497399d7a93 原文:https://blog.csdn.net/qq_34438958/article/details/72792977   

转载请注明原文地址: https://www.6miu.com/read-5028662.html

最新回复(0)