Visual Basic 6.0
Visual Basic 6.0
Example: Crypt2.EncryptSb method
Demonstrates how to call the EncryptSb method.Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim crypt As New ChilkatCrypt2
Dim bdEncrypted As New ChilkatBinData
Dim sbPlainText As New ChilkatStringBuilder
success = sbPlainText.Append("Text to be encrypted")
' ...
' Set the secret key ...
' Set properties such as CryptAlgorithm, CipherMode, PaddingScheme, KeyLength
' Set the IV if needed ...
' ...
crypt.Charset = "utf-8"
success = crypt.EncryptSb(sbPlainText,bdEncrypted)
If (success = 0) Then
Debug.Print crypt.LastErrorText
Exit Sub
End If