paj-md5.js

Paul Johnston's md5.js

Usage no npm install needed!

<script type="module">
  import pajMd5Js from 'https://cdn.skypack.dev/paj-md5.js';
</script>

README

paj-md5.js

usage

npm install paj-md5.js --save
import md5 from 'paj-md5.js'

let hex_md5v_res = md5.hex_md5(Date.now() + '')
console.log(
  '%c [ hex_md5v_res ]',
  'font-size:13px; background:pink; color:#bf2c9f;',
  hex_md5v_res
)

let b64_md5v_res = md5.b64_md5(Date.now() + '')
console.log(
  '%c [ b64_md5v_res ]',
  'font-size:13px; background:pink; color:#bf2c9f;',
  b64_md5v_res
)

let str_md5v_res = md5.str_md5(Date.now() + '')
console.log(
  '%c [ str_md5v_res ]',
  'font-size:13px; background:pink; color:#bf2c9f;',
  str_md5v_res
)

let hex_hmac_md5v_res = md5.hex_hmac_md5('my_key', Date.now() + '')
console.log(
  '%c [ hex_hmac_md5v_res ]',
  'font-size:13px; background:pink; color:#bf2c9f;',
  hex_hmac_md5v_res
)

let b64_hmac_md5v_res = md5.b64_hmac_md5('my_key', Date.now() + '')
console.log(
  '%c [ b64_hmac_md5v_res ]',
  'font-size:13px; background:pink; color:#bf2c9f;',
  b64_hmac_md5v_res
)

let str_hmac_md5v_res = md5.str_hmac_md5('my_key', Date.now() + '')
console.log(
  '%c [ str_hmac_md5v_res ]',
  'font-size:13px; background:pink; color:#bf2c9f;',
  str_hmac_md5v_res
)

更多请参考:Paj's Home

License

MIT

Copyright (c) 2021-present, cl1107