MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / ExtrDllGetPassword

Method ExtrDllGetPassword

Libraries/unrar/extract.cpp:954–981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952
953#ifdef RARDLL
954bool CmdExtract::ExtrDllGetPassword()
955{
956 if (!Cmd->Password.IsSet())
957 {
958 if (Cmd->Callback!=NULL)
959 {
960 wchar PasswordW[MAXPASSWORD];
961 *PasswordW=0;
962 if (Cmd->Callback(UCM_NEEDPASSWORDW,Cmd->UserData,(LPARAM)PasswordW,ASIZE(PasswordW))==-1)
963 *PasswordW=0;
964 if (*PasswordW==0)
965 {
966 char PasswordA[MAXPASSWORD];
967 *PasswordA=0;
968 if (Cmd->Callback(UCM_NEEDPASSWORD,Cmd->UserData,(LPARAM)PasswordA,ASIZE(PasswordA))==-1)
969 *PasswordA=0;
970 GetWideName(PasswordA,NULL,PasswordW,ASIZE(PasswordW));
971 cleandata(PasswordA,sizeof(PasswordA));
972 }
973 Cmd->Password.Set(PasswordW);
974 cleandata(PasswordW,sizeof(PasswordW));
975 Cmd->ManualPassword=true;
976 }
977 if (!Cmd->Password.IsSet())
978 return false;
979 }
980 return true;
981}
982#endif
983
984

Callers

nothing calls this directly

Calls 4

GetWideNameFunction · 0.85
cleandataFunction · 0.85
SetMethod · 0.80
IsSetMethod · 0.45

Tested by

no test coverage detected