This function encrypts the source text using the crypt key.
object.LineEncrypt(Line)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISEncryptObject interface |
|
Line |
In, Required | string |
The source text for encrypting |
string
Display the source text and the result of its encrypting and decrypting.
Dim aEncryptObject
Dim aSourceText
Dim aEncryptedText, aDecryptedText
Set aEncryptObject = Profile.CreateEncryptObject
aSourceText = "Patient has a disease"
aEncryptObject.CryptKey = "12345"
aEncryptedText = aEncryptObject.LineEncrypt(aSourceText)
aDecryptedText = aEncryptObject.LineDecrypt(aEncryptedText)
Profile.MsgBox("Source Text: " & aSourceText & vbNewLine &_
"Encrypted Text: " & aEncryptedText & vbNewLine &_
"Decrypted Text: " & aDecryptedText)