---- DelphiMIDASؼΪдṩʮֶַΡЩؼԱдϵĿͻϵҲܷInternetϴɢӦá
---- һҪǰȫԿǡһЩϴͣпܱ˷ǷɲҪʧʵʵı̹УҲȡһЩЧķʩڴЩĽܡ
---- һ ԭ
---- Ŀǰݼܵķܶ࣬ݵıһáù̶ԿԿһܴͣﵽıЧʵУһסӦģʽԿݵıЧʮ⡣
---- ͻ˳ͼʱͻӷȡһɷִϵͳԴִΪԿû¼ݡԿɷͻÿε¼ʱԿͬ˴뱻صݱԵĿԡ
---- ˿ԶģһԶӿڣýӿڷһִԶģҪ¼ִΪԿִIJԶֶķRandom()һɴFormat()IntToStr()һַ
---- û¼ʩ
---- Ϊ˷ֹǷԴӶй¶룬뽫ͻĵ¼Ϣڷ˴Ҳרһȫ㸺ͻĵ¼ͻĵ¼ϢڿͻϱУû롢ȨϢ
---- ͻ¼ʱȵ÷ĽӿڻԿִôԿûûмܲ͵¼Ϣ㷨DES㷨Ч㷨ӵ¼Ϣǰ¼ԿԵ¼ϢнܣٽܺϢ洢ĿͻϱеϢжգӶжϿͻϢǷϷԼÿͻеȨȡ
---- ù̵Ŀͻ˳£
strKey:=myRemoteSever.GetKey();
{÷ĽӿڻԿ}
UserName:=Ency(strUserName,strKey);
{ûܣEncy()Ϊ㷨}
Password:=Ency(strPassword,strKey);
{Ե¼м}
If myRemoteServer.LogIn(UserName,Password) then {¼}
Begin
{д}
End;
˵ĵ¼LogIn()£
strUserName:=DeEncy(UserName,strKey);
{ûܣDeEncy()Ϊ㷨}
strPassword:=DeEncy(Password,strKey);
{Ե¼}
{ѯݿ}
if (Pass) then
Result:=true
Else
Result:=false;
---- ҪעǣڷͿͻУStrKeyӦΪȫ̱
---- Ϊ˷ֹͻϱӶй¶룬ԶԿͻϽһļܴʩPARADOXPasswordڷʿͻϱʱṩPassword
---- ݴ
---- УһЩϴʱܡDelphiMIDASṩݼܵ;ݴͻ֮ǰһЩֶνмܣҲڽյͻ˵ĸԿͻ˵ݵӦֶνнܺݿи¡Ϊ˴ﵽЩĿģڷԶģмһTproviderTdataSetProvider˶DataSetΪҪݼTproviderOnGetData¼м´룺
with DataSet do
begin
while not EOF do
begin
Edit;
SensitiveData.AsString :=
Ency(SensitiveData.AsString,strKey);
{ݼ}
Post;
Next;
end;
end;
---- ϴԽݼܺͻ
---- ͬTproviderOnUpdateData¼мһЩɶԿͻݽнܡ
---- ֻǽȫʩʵֵһԭڴ˻ϣܴʩԴﵽõıЧ磬ͻضĸӲ豸ӰȫԡܿӦóУͻڵ¼ʱҪûû룬ͬʱICдICͼضݣʹй¶˲ᱻð¼ȻκΰȫʩǾȫģȫʩҪϸıƶȼʹԱĸ߶ȵıʶá