울어라휘파람새야

AES Encryption (Classic ASP 암호화) 본문

밥줄/ASP

AES Encryption (Classic ASP 암호화)

꼬꼬리코 2011. 11. 30. 11:20
AED 암호화 간단 예제

<%
'* 예제
Option Explicit
Session.CodePage=65001
Response.Charset="UTF-8"
%>
<!--#include virtual="include/aesLibrary.asp"-->
<%
Dim dataIn, encrypted, decrypted, password
if LCase(Request.ServerVariables("HTTP_METHOD"))="post" then
    dataIn=request.form("dataIn")
    password=request.form("password")
 
    encrypted = AESEncrypt(dataIn, password)
    decrypted = AESDecrypt(encrypted, password)
end if
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">

<head>
<title>rodsdot.com :: AES encryption and decryption</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="author" content="Roderick Divilbiss">
<meta name="copyright" content="© 2005-2010 Roderick Divilbiss">
</head>

<body>
<form method="POST" action="AES.asp">
  <p>Data In<br><textarea rows="5" name="dataIn" cols="50"><%=dataIn%></textarea></p>
  <p>Password<br><input type="text" name="password" size="50" value="<%=password%>"></p>
  <p><input type="submit" value="Submit" name="B1"></p>
  <p>Encrypted<br><textarea rows="5" name="encrypted" cols="50"><%=encrypted%></textarea></p>
  <p>Decrypted<br><textarea rows="5" name="decrypted" cols="50"><%=decrypted%></textarea></p>
</form>
</body>
 
</html>
--------------------------------------------------------------------
출처: http://www.rodsdot.com/asp/AES-Encryption-Using-ASP.asp
--------------------------------------------------------------------
첨부파일 : 

 
Comments