![]() |
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
(Tcl) Workaround for the deprecated Crypt2.VerifyString methodShows how to replace the deprecated VerifyString method. (Chilkat is moving away from the use of CkByteData.) Note: This example requires Chilkat v11.0.0 or greater.
load ./chilkat.dll set crypt [new_CkCrypt2] # Specifies how the original data bytes are converted to characters CkCrypt2_put_Charset $crypt "utf-8" set originalText "this is the string that was signed." set sigPath "c:/someDir/example.p7s" # ------------------------------------------------------------------------ # The OpaqueVerifyString method is deprecated: set detachedSigBytes [new_CkByteData] CkByteData_loadFile $detachedSigBytes $sigPath set verified [CkCrypt2_VerifyString $crypt $originalText $detachedSigBytes] # ------------------------------------------------------------------------ # Workaround. # (Chilkat is moving away from using CkByteData) set bdSig [new_CkBinData] CkBinData_LoadFile $bdSig $sigPath set encoding "base64" CkCrypt2_put_EncodingMode $crypt $encoding set verified [CkCrypt2_VerifyStringENC $crypt $originalText [CkBinData_getEncoded $bdSig $encoding]] delete_CkCrypt2 $crypt delete_CkByteData $detachedSigBytes delete_CkBinData $bdSig |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.