MD5 哈希计算类,支持流式更新。
// 基本用法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();
Returns final hash.
Returns hash as a hex string.
Update internal state.
data to update, data cannot exceed 2^32 bytes.
MD5 哈希计算类,支持流式更新。
Example