ASP Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

ASP Examples

ASP String
ASP Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar
ASP Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

ASP Encrypt AES String Encryption / Decryption Functions

Download Chilkat Crypt ActiveX

Functions for string-to-string AES encryption / decryption in ASP.

<html>
<body>
<%

function encryptString(passwordStr, toBeEncryptedStr)

	Set crypt = Server.CreateObject("Chilkat.Crypt2")
	crypt.UnlockComponent "Anything for 30-day trial"
	crypt.CryptAlgorithm = "aes"
	crypt.CipherMode = "cbc"
	crypt.KeyLength = 128
	crypt.SecretKey = crypt.GenerateSecretKey(passwordStr)
	crypt.EncodingMode = "base64"
	encryptString = crypt.EncryptStringENC(toBeEncryptedStr)
	
end function

function decryptString(passwordStr, toBeDecryptedStr)

	Set crypt = Server.CreateObject("Chilkat.Crypt2")
	crypt.UnlockComponent "Anything for 30-day trial"
	crypt.CryptAlgorithm = "aes"
	crypt.CipherMode = "cbc"
	crypt.KeyLength = 128
	crypt.SecretKey = crypt.GenerateSecretKey(passwordStr)
	crypt.EncodingMode = "base64"
	decryptString = crypt.DecryptStringENC(toBeDecryptedStr)

end function

Response.Write "<p>Encrypt: Hello World!</p>"
encryptedStr = encryptString("secret","Hello World!")
Response.Write "<p>Encrypted: " & Server.HtmlEncode(encryptedStr) & "</p>"
Response.Write "<p>Decrypted: " & Server.HtmlEncode(decryptString("secret",encryptedStr)) & "</p>"


%>
</body>
</html>
 

© 2000-2012 Chilkat Software, Inc. All Rights Reserved.