if (Pos(pw[2*i + 0 + 1], '0123456789abcdefABCDEF') > 0) and
(Pos(pw[2*i + 1 + 1], '0123456789abcdefABCDEF') > 0) then begin
convpw := convpw +
- Char(StrToInt( pw[2*i + 0 + 1] ) shl 4 + StrToInt( pw[2*i + 1 + 1] ));
+ Char(StrToInt( 'x' + pw[2*i + 0 + 1] ) shl 4 + StrToInt( 'x' + pw[2*i + 1 + 1] ));
end else begin
convpw := '';
Break;
if pw[ 0 ] = '#' then begin
get_pw_salt(pw, convpw, salt);
end;
- if Length(convpw) = 8 then begin
+ if (pw[ 0 ] = '#') and (Length(pw) >= 12) then begin
+ // \8f«\97\88\82Ì\8ag\92£\97p
+ Result := '???';
+ end else if Length(convpw) = 8 then begin
Result := Copy( crypt_r( PChar(convpw), salt, s ), 4, 100 );
end else begin
// \90V\95û\8e®