Last active
March 1, 2017 07:05
-
-
Save janthony/b1cde9747d48c27b8e1c92ef461a8123 to your computer and use it in GitHub Desktop.
Crypto.js modular consumption example
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> | |
<meta charset="utf-8"> | |
<title>Hello crypto</title> | |
<script src="scripts/require.js"></script> | |
<script type="text/javascript"> | |
require.config({ | |
packages: [ | |
{ | |
name: 'crypto-js', | |
location: 'scripts/crypto-js', | |
main: 'index' | |
} | |
] | |
}); | |
require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) { | |
console.log("rocks"); | |
console.log(SHA256("Message")); | |
}); | |
</script> | |
</head> | |
<body> | |
<p>Hello world</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment