<script type="text/javascript" src="MD5.js"></script> <script type="text/javascript" src="sha.js"></script> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> /** * jsSHA is the workhorse of the library. Instantiate it with the string to * be hashed as the parameter * * @constructor * @this {jsSHA} * @param {string} variant The desired SHA variant (SHA-1, SHA-224, SHA-256, * SHA-384, or SHA-512) * @param {string} inputFormat The format of srcString: HEX, TEXT, B64, or BYTES * @param {{encoding: (string|undefined), numRounds: (string|undefined)}=} * options Optional values */ var jsSHA = function(variant, inputFormat, options) --> <script type="text/javascript"> function showM(o){ var hasher1 = new jsSHA('SHA-1', 'BYTES',{}); hasher1.update(o.value); alert(o.value); alert(hasher1.getHash('HEX')); alert(MD5(o.value)); } </script>