Skip to content

Commit

Permalink
SCRAM support, SHA-1 and SHA-256
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Drennan committed Mar 5, 2019
1 parent 3d8db7b commit 6a1860e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Grijjy.Scram.pas
Expand Up @@ -141,16 +141,16 @@ function ConcatenateBytes(const ADestBytes: TBytes; const ASourceBytes: TBytes):

function SaslPrepPassword(APassword: String): String;
var
I: Integer;
I: Integer;
begin
Result := APassword;
for I := 1 to Length(APassword) do
case Word(APassword[I]) of
$00A0, $1680, $2000, $2001, $2002, $2003, $2004, $2005, $2006, $2007, $2008, $2009, $200A, $202F, $205F, $3000:
begin
Result[I] := #$0020;
end;
end;
Result := APassword;
for I := 1 to Length(APassword) do
case Word(APassword[I]) of
$00A0, $1680, $2000, $2001, $2002, $2003, $2004, $2005, $2006, $2007, $2008, $2009, $200A, $202F, $205F, $3000:
begin
Result[I] := #$0020;
end;
end;
end;

{ TgoScram }
Expand Down

0 comments on commit 6a1860e

Please sign in to comment.