Created
July 10, 2017 21:43
-
-
Save pcorpet/17cd4ef65e279d67f4e0e50d40abb39b to your computer and use it in GitHub Desktop.
Simple page to SHA-1 hash many strings
This file contains hidden or 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
<html> | |
<head> | |
<script src="https://cdn.rawgit.com/emn178/js-sha1/c724643d/src/sha1.js"></script> | |
<script> | |
function hashIt() { | |
var content = document.getElementById('content').value | |
document.getElementById('result').innerText = | |
content.split('\n').map(sha1).join('\n') | |
} | |
</script> | |
</head> | |
<body style="box-sizing: border-box; margin: 0; display: flex; min-height: 100vh; padding: 10px"> | |
<textarea id="content" style="flex: 1"></textarea> | |
<button onClick="hashIt()" style="align-self: center; margin: 20px"> | |
Hash It | |
</button> | |
<pre id="result" style="flex: 1"> | |
</pre> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment