Created
September 30, 2016 03:20
-
-
Save CristhianMotoche/0bfd6b38f3f8317723265947f380fa63 to your computer and use it in GitHub Desktop.
Uso de bibliotecas especializadas para cifrar una contraseña en base a algún algoritmo.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Crifrar</title> | |
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script> | |
<script> | |
function cifrar(word){ | |
hash = CryptoJS.MD5(word); | |
document.getElementById("pass").innerHTML = hash; | |
} | |
</script> | |
</head> | |
<body> | |
<input type="password" id="entrada"> | |
<button onclick="cifrar(document.getElementById('entrada').value)">¡Cifra tu contraseña!</button> | |
<p id="pass" type="password"></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment