OPTION EXPLICIT Const calg3DES=26115 Dim EncryKey, EncryIV, SecretString EncryKey="cPSQAC05GBXzMhRRz7tm8cqg+vHdHyN5" EncryIV="jIShBJVBfXo=" SecretString="blueberry" 'initialize encryption objects Dim CM, CryptoContext Set CM=Server.CreateObject("Persits.CryptoManager") Set CryptoContext=CM.openContext("",true) 'init key Dim CryptoKey, KeyBlob, IVBlob Set KeyBlob=CM.CreateBlob KeyBlob.Base64=EncryKey Set IVBlob=CM.CreateBlob IVBlob.Base64=EncryIV Set CryptoKey=CryptoContext.ImportRawKey(KeyBlob, calg3DES, true) CryptoKey.SetIV IVBlob Set KeyBlob=Nothing Set IVBlob=Nothing 'dectypt value Dim oTextBlob, EncryptedBlob, EncryptedString Set oTextBlob=CM.CreateBlob oTextBlob=SecretString Set EncryptedBlob = CryptoKey.EncryptText(oTextBlob) EncryptedString = EncryptedBlob.Base64 Set oTextBlob=Nothing Set EncryptedBlob=Nothing Response.Write EncryptedString 'clean up Set CryptoKey=Nothing Set CryptoContext=Nothing Set CM=Nothing