Lib�re les ressources utilis�es par une cl�
#include <Crypt.au3>
_Crypt_DestroyKey ( $hCryptKey )
$hCryptKey | Cl� � d�truire |
Succ�s: | Retourne True |
�chec: | Retourne False et d�finit @error <> 0. |
@error: | 10 - La destruction de la cl� a �chou� |
D�truit une cl� pr�c�demment cr��e par _Crypt_DeriveKey()
Recherchez CryptDestroyKey dans la biblioth�que MSDN.
#include <Crypt.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $aStringsToEncrypt[6] = ["AutoIt", "SciTE", "Crypt", ".au3", 42, "42"] Local $sOutput = "" Local $hKey = _Crypt_DeriveKey("CryptPassword", $CALG_RC4) ; D�clare un mot de passe sous forme de cha�ne et l'algorithme pour cr�er une cl� de chiffrement. For $vText In $aStringsToEncrypt $sOutput &= $vText & @TAB & " = " & _Crypt_EncryptData($vText, $hKey, $CALG_USERKEY) & @CRLF ; Chiffre le texte avec la cl� de chiffrement. Next MsgBox($MB_SYSTEMMODAL, "Donn�es chiffr�es", $sOutput) _Crypt_DestroyKey($hKey) ; D�truit la cl� de chiffrement. EndFunc ;==>Example