Skip to content

Instantly share code, notes, and snippets.

@lucasres
Created February 14, 2020 13:07
Show Gist options
  • Save lucasres/c213f2ba652312b3699bac4e9b31fe93 to your computer and use it in GitHub Desktop.
Save lucasres/c213f2ba652312b3699bac4e9b31fe93 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/hmac-sha256.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/enc-base64.min.js"></script>
<script>
var hash = CryptoJS.HmacSHA256('secret message', "ENIGMA MACHINE").toString(CryptoJS.enc.Hex)
document.write(hash);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment