![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Example: Crypt2.EncryptSb methodDemonstrates how to call the EncryptSb method.
Use ChilkatAx-win32.pkg Procedure Test Handle hoCrypt Boolean iSuccess Variant vBdEncrypted Handle hoBdEncrypted Variant vSbPlainText Handle hoSbPlainText String sTemp1 Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt If (Not(IsComObjectCreated(hoCrypt))) Begin Send CreateComObject of hoCrypt End Get Create (RefClass(cComChilkatBinData)) To hoBdEncrypted If (Not(IsComObjectCreated(hoBdEncrypted))) Begin Send CreateComObject of hoBdEncrypted End Get Create (RefClass(cComChilkatStringBuilder)) To hoSbPlainText If (Not(IsComObjectCreated(hoSbPlainText))) Begin Send CreateComObject of hoSbPlainText End Get ComAppend Of hoSbPlainText "Text to be encrypted" To iSuccess // ... // Set the secret key ... // Set properties such as CryptAlgorithm, CipherMode, PaddingScheme, KeyLength // Set the IV if needed ... // ... Set ComCharset Of hoCrypt To "utf-8" Get pvComObject of hoSbPlainText to vSbPlainText Get pvComObject of hoBdEncrypted to vBdEncrypted Get ComEncryptSb Of hoCrypt vSbPlainText vBdEncrypted To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoCrypt To sTemp1 Showln sTemp1 Procedure_Return End End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.