| 1025 | |
| 1026 | #if defined(_WIN_ALL) && !defined(SFX_MODULE) |
| 1027 | void CmdExtract::ConvertDosPassword(Archive &Arc,SecPassword &DestPwd) |
| 1028 | { |
| 1029 | if (Arc.Format==RARFMT15 && Arc.FileHead.HostOS==HOST_MSDOS) |
| 1030 | { |
| 1031 | // We need the password in OEM encoding if file was encrypted by |
| 1032 | // native RAR/DOS (not extender based). Let's make the conversion. |
| 1033 | wchar PlainPsw[MAXPASSWORD]; |
| 1034 | Cmd->Password.Get(PlainPsw,ASIZE(PlainPsw)); |
| 1035 | char PswA[MAXPASSWORD]; |
| 1036 | CharToOemBuffW(PlainPsw,PswA,ASIZE(PswA)); |
| 1037 | PswA[ASIZE(PswA)-1]=0; |
| 1038 | CharToWide(PswA,PlainPsw,ASIZE(PlainPsw)); |
| 1039 | DestPwd.Set(PlainPsw); |
| 1040 | cleandata(PlainPsw,sizeof(PlainPsw)); |
| 1041 | cleandata(PswA,sizeof(PswA)); |
| 1042 | } |
| 1043 | } |
| 1044 | #endif |
| 1045 | |
| 1046 |
nothing calls this directly
no test coverage detected