Last active
December 22, 2015 14:32
-
-
Save aaizemberg/ed99724d66344da17766 to your computer and use it in GitHub Desktop.
md5 generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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