Help us understand the problem. What is going on with this article?

【TypeScript】シンプルなMD5変換方法

More than 3 years have passed since last update.

Node.jsでのMD5の変換を調べてみたら、cryptoという標準ライブラリがあったのですが、
https://nodejs.org/api/crypto.html#crypto_crypto

もっと簡単なライブラリがあったので、記事にしてみました。

NPM

https://www.npmjs.com/package/md5

$ npm install md5 --save
$ npm install @types/md5 --save

使い方

DefinitelyTypedのテストコードを参考にするとわかりやすい
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/md5/md5-tests.ts

md5の使い方
import * as md5 from 'md5';

const message = 'hoge'
console.log(md5(message));

なんとシンプル!!

ffggss
サーバーサイドエンジニアです。 ジムで格闘技系のレッスンを受けるのが趣味です
https://github.com/YukiFujisawa
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした