Function Reference

_Crypt_DestroyKey

鍵で使用されているリソースを解放します。

#Include <Crypt.au3>
_Crypt_DestroyKey($hCryptKey)

 

パラメータ

$hCryptKey 破棄する鍵

 

返し値

成功: True
@errorを0に設定します
失敗: -1を返し、@errorを設定します:
1 - 鍵の破棄に失敗

 

注意

_Crypt_DeriveKeyによって作成された鍵を破棄します。

 

関連

_Crypt_DeriveKey

 

こちらも参照

MSDNライブラリでCryptDestroyKeyを検索して下さい。

 


#include <Crypt.au3>

;_Crypt_DeriveKeyを使用した鍵の作成例

Local $StringsToCrypt[6]=["Bluth","Sunny","AutoIt3","SciTe",42,"42"]
Local $Crypted[6]


; DeriveKey/DestroyKeyが内部で処理するので_Crypt_Startupは必要ない
$Key=_Crypt_DeriveKey("supersecretpassword",$CALG_RC4)

$DisplayStr=""

for $Word In $StringsToCrypt
    $DisplayStr&=$Word&@TAB&" = "&_Crypt_EncryptData($Word,$Key,$CALG_USERKEY)&@CRLF
Next

MsgBox(0,"Crypt table",$DisplayStr)

_Crypt_DestroyKey($Key)