This example shows how to decrypt data.

 

   
Setup
 
     

First we'll set up some convenient variables containing our password and the text we want to decrypt. We'll assume we're going to decrypt the data that we generated in our encryption example.

thePass = "pittabread"
theText = "c42cec7872a191be4950824dac1b3999bb15e4d0e436ecf4
1481e6f652c1490ee80a23f69f1101cf1f92656bd9f2b474..."

   
Crypto
 
     

Next we create an ABCCrypto Crypto object and ask it to decrypt 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
theContent = theCrypto.Decrypt(theText)
Response.Write(theContent)

 

   
Results
 
     

This is the kind of output you might get.

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.