Author: Rfrancisco | Posted on: 6/26/2004 6:44:55 PM | Views : 346

My company has a product that was developed using AspEncrypt, now in the new version we are no longer using AspEncrypt but we need to mantain compatibility. in the previous version of the application we had something like this :


Function Encrypt() as string
Dim CM As ASPENCRYPTLib.CryptoManager
Dim AspEncContext As ASPENCRYPTLib.ICryptoContext
Dim Key As ASPENCRYPTLib.ICryptoKey
Dim Blob As ASPENCRYPTLib.ICryptoBlob
Dim Hash As ASPENCRYPTLib.ICryptoHash

CM = New ASPENCRYPTLib.CryptoManager

AspEncContext = CM.OpenContext("", True)

Key = AspEncContext.GenerateKeyFromPassword("Password", , , 40)
Blob = Key.EncryptText("texttoencode")

Return CStr(Blob.Hex)
End Function
Go to the complete details ...