MD5 哈希计算类,支持流式更新。
1.0.0
// 基本用法const hash = new Md5().update('Hello, World!').toString();console.log(hash); // '65a8e27d8879283831b664bd8b7f0ad4'// 流式更新const md5 = new Md5();md5.update('Hello, ');md5.update('World!');console.log(md5.toString()); // '65a8e27d8879283831b664bd8b7f0ad4'// 获取 ArrayBufferconst buffer = new Md5().update('test').digest(); Copy
// 基本用法const hash = new Md5().update('Hello, World!').toString();console.log(hash); // '65a8e27d8879283831b664bd8b7f0ad4'// 流式更新const md5 = new Md5();md5.update('Hello, ');md5.update('World!');console.log(md5.toString()); // '65a8e27d8879283831b664bd8b7f0ad4'// 获取 ArrayBufferconst buffer = new Md5().update('test').digest();
返回最终的哈希值。
以十六进制字符串形式返回哈希值。
更新内部状态。
要更新的数据,数据大小不能超过 2^32 字节。
MD5 哈希计算类,支持流式更新。
Since
1.0.0
Example