掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
turboDelphiのindyでTIdSASLCRAMMD5の使用 (ID:29209)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Indy9がインストールされている状態で Indy10をLibにコピーして試しただけだけど なのでこんな感じなのかな? CopyTIdBytes は IBGlobal.pas に定義されている関数だけど class function TIdSASLCRAMMD5.BuildKeydMD5Auth(const Password, Challenge: string): string; のローカル関数にしても良いとも思うけど 他の所で使っている場合そこでも異常終了しそうだけど procedure CopyTIdBytes(const ASource: TIdBytes; const ASourceIndex: Integer; const VDest: TIdBytes; const ADestIndex: Integer; const ALength: Integer); var I : Integer; begin //if this assert fails, then it indicates an attempted read-past-end-of-buffer. Assert(ALength<=Length(aSource)); //Move(ASource[ASourceIndex], VDest[ADestIndex], ALength); for I:=0 to ALength -1 do begin VDest[ADestIndex] := ASource[ASourceIndex]; end; end; IdZeroMemory は元々ローカル関数なので他に影響なし // Zero out a memory zone procedure IdZeroMemory(const Dest: TIdbytes; Length: Integer); begin CopyTIdBytes(ToBytes(StringOfChar(#0, Length)), 0, Dest , 0, Length); end; IdZeroMemory(AKey.Memory, AKey.Size); で AKey.Memory から Akey.Size 分 Zero にしているだけだから ここで関数呼ばずに初期化しても良さそうだけど
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.