Skip to content

Instantly share code, notes, and snippets.

@aaizemberg
Last active December 22, 2015 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaizemberg/ed99724d66344da17766 to your computer and use it in GitHub Desktop.
Save aaizemberg/ed99724d66344da17766 to your computer and use it in GitHub Desktop.
md5 generator
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script src="http://www.myersdaily.org/joseph/javascript/md5.js"></script>
<meta charset="utf-8">
<title>md5 generator</title>
</head>
<body>
<h1>md5 generator</h1>
md5(<input type="text" name="input"> ) = '<span id="result">d41d8cd98f00b204e9800998ecf8427e</span>'
<script>
var input = document.querySelector('input');
input.addEventListener('input', function() {
d3.select('span#result').html('<b>' + md5(input.value) + '</b>');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment