This example shows how to encrypt data.

 

   
Setup
 
     

First we'll set up some convenient variables containing our password and the text we want to encrypt.

thePass = "pittabread"
theText = "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur. Hi omnes lingua, institutis, legibus inter se differunt."

   
Crypto
 
     

Next we create an ABCCrypto Crypto object and ask it to encrypt the data using the password we provided as a key. Finally we'll write out the encrypted text to the web page so that you can see it.

Set theCrypto = Server.CreateObject("ABCCrypto2.Crypto")
theCrypto.License = "30-day-trial"
theCrypto.Password = thePass
theEncrypted = theCrypto.Encrypt(theText)
Response.Write(theEncrypted)

 

   
Results
 
     

This is the kind of output you might get.

c42cec7872a191be4950824dac1b3999bb15e4d0e436ecf4
1481e6f652c1490ee80a23f69f1101cf1f92656bd9f2b474
82513d894ecd54957652114069384a55ce68ed7a97b3f26a
5bf1e1ca8b443247face68fcfbe7804f938645b0014c51b8
f7020fb43cb3a2eda1751d3a8cbc3ab803a4f60e6fb1526e
b6c3be3e3f37181abfb509d6fe31e7903cd5710f716e9c92
c9da6ded2dc6ae2a3e79a2bb4ed886d24fbed1f13879a168
a2a00b7048e97bc2428cd8cc37c72db725948122b7c4875e
33d2aa2385a8203285a77ec0c0dc8a52c221c1b5a7506896
dbce73bf5bf21dc3fa2be2c326e411ba29059e21b9108852
28c929f6931b1842a865610f79ebd9efbaf26fa990052120
50d2a963f3a2c82c1f811489229db244642670f5ba0c8dd4
e4d999493e159e02f1d1b055520be343015e134ef8fd45bd
e91ae5bcd08a7223826ce417e7688e8ac0e851b11ce2519f
9234222a488de0ecc2548138b03ad243f843a85bc018eabf
c7cb43ca53a01e46e8251bd533349725ca5bf64576f8f7bb
60c4e94911ebe75584520d7359b02b67e0e058db