UNPKG
@pushrocks/smarthash
Version:
latest (3.0.2)
3.0.2
3.0.1
2.1.10
2.1.9
2.1.6
2.1.1
2.1.0
2.0.6
2.0.4
2.0.3
2.0.1
2.0.0
simplified access to node hash functions
@pushrocks/smarthash
/
ts
/
nodehash.md5.ts
6 lines
(4 loc)
•
195 B
text/typescript
View Raw
1
2
3
4
5
6
import
*
as
plugins
from
'./nodehash.plugins.js'
;
export
const
md5FromString
=
async
(
stringToHash
:
string
) => {
return
plugins.
crypto
.
createHash
(
'md5'
).
update
(stringToHash).
digest
(
'hex'
); };