인터넷정보

자바 스크립트로 md4, md5, hex 변환하기

알 수 없는 사용자 2007. 10. 18. 13:58

http://oxtag.com/html/ex/ex/md5/md5.html

<script src="md4.js" type="text/javascript"></script>
<script src="md5.js" type="text/javascript"></script>
<script src="sha1.js" type="text/javascript"></script>

<form>

<table class="indented">
  <tr><th>Input</th><td><input type="text" name="input" size="40"></td></tr>
  <tr><th>Calculate</th>
  <td style="text-align:center"><input type="button" onclick="hash.value = hex_md4(input.value)" value="MD4">
  <input type="button" value="MD5" onclick="hash.value = hex_md5(input.value)">
  <input type="button" value="SHA-1" onclick="hash.value = hex_sha1(input.value)"></td></tr>
  <tr><th>Result</th><td><input type="text" name="hash" size="40"></td></tr>
</table>

</form>

반응형