![]() |
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
(AutoIt) Example: Crypt2.ClearEncryptCerts methodDemonstrates how to call the ClearEncryptCerts method.
$oCrypt = ObjCreate("Chilkat.Crypt2") ; Tell the crypt object to use 3 certificates. ; Do this by calling AddEncryptCert for each certificate. $oCert1 = ObjCreate("Chilkat.Cert") ; ... ; Load the cert from a source such as a .pfx/.p12 file, smart card, USB token, Apple keychain, Windows certificate store, etc. ; ... $oCrypt.AddEncryptCert $oCert1 $oCert2 = ObjCreate("Chilkat.Cert") ; ... $oCrypt.AddEncryptCert $oCert2 $oCert3 = ObjCreate("Chilkat.Cert") ; ... $oCrypt.AddEncryptCert $oCert3 ; Params for public-key encryption to create PKCS7 enveloped-data $oCrypt.CryptAlgorithm = "pki" $oCrypt.Pkcs7CryptAlg = "aes" $oCrypt.KeyLength = 256 $oCrypt.OaepHash = "sha256" $oCrypt.OaepPadding = True $oBd = ObjCreate("Chilkat.BinData") ; ... Local $bSuccess = $oCrypt.EncryptBd($oBd) ; Let's say we now want to encrypt something else with different certs.. ; First clear the encryption certs. $oCrypt.ClearEncryptCerts $oCert4 = ObjCreate("Chilkat.Cert") ; ... $oCrypt.AddEncryptCert $oCert4 $oCert5 = ObjCreate("Chilkat.Cert") ; ... $oCrypt.AddEncryptCert $oCert5 ; ... ; ... ; Encrypt using cert4 and cert5. $bSuccess = $oCrypt.EncryptBd($oBd) |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.