smarthash/ts/nodehash.md5.ts

9 lines
207 B
TypeScript
Raw Normal View History

2019-11-21 14:17:48 +00:00
import * as plugins from './nodehash.plugins';
export const md5FromString = async (stringToHash: string) => {
2019-11-21 14:20:57 +00:00
return plugins.crypto
.createHash('md5')
.update(stringToHash)
.digest('hex');
2019-11-21 14:17:48 +00:00
};