JSFiddle - React, Tailwind, and code Playground

by Trevor W

JavaScript

'use strict'
const crypto = require('crypto');
(() => {
  const data = 'Hogehoge1';
  console.log(hash(data));
})();
function hash(data) {
  const hash = crypto.createHash('sha256');
  hash.update(data);
  return hash.digest('hex');
}