Skip to content

자바스크립트를 이용한 암호화

MintState September 1, 2009 at 10:10 AM Views 18696

자바스크립트를 이용한 암호화

md4, md5, sha1, sha256, sha512 암호화 입니다.
출처는 http://pajhome.org.uk/crypt/md5 입니다.
첨부파일을 확인하세요.

<script src="md4.js" type="text/javascript"></script> 
<script src="md5.js" type="text/javascript"></script> 
<script src="sha1.js" type="text/javascript"></script> 
<script src="sha256.js" type="text/javascript"></script> 
<script src="sha512.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" style="width:100px;height:50px" onclick="hash.value = hex_md4(input.value)" value="MD4"> 
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_md5(input.value)" value="MD5"> 
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_sha1(input.value)" value="SHA-1">
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_sha256(input.value)" value="SHA-256">
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_sha512(input.value)" value="SHA-512">
  </td></tr> 
  <tr><th>Result</th><td><input type="text" name="hash" size="100"></td></tr> 
</table>
</form> 

<script language="JavaScript">
	var sign = hex_hmac_md5("bar", "foo");
	alert(sign);
</script>

Attachments

Share X Facebook LINE QR code

0 comments

Be the first to comment.