equal
deleted
inserted
replaced
66 procedure SHA1Hash(var Context: TSHA1Context); |
66 procedure SHA1Hash(var Context: TSHA1Context); |
67 var S: array[0..4 ] of LongWord; |
67 var S: array[0..4 ] of LongWord; |
68 W: array[0..79] of LongWord; |
68 W: array[0..79] of LongWord; |
69 i, t: LongWord; |
69 i, t: LongWord; |
70 begin |
70 begin |
|
71 {$HINTS OFF} |
71 move(Context.H, S, sizeof(S)); |
72 move(Context.H, S, sizeof(S)); |
|
73 {$HINTS ON} |
72 for i:= 0 to 15 do |
74 for i:= 0 to 15 do |
73 SDLNet_Write32(PLongWordArray(@Context.Buf)^[i], @W[i]); |
75 SDLNet_Write32(PLongWordArray(@Context.Buf)^[i], @W[i]); |
74 |
76 |
75 for i := 16 to 79 do |
77 for i := 16 to 79 do |
76 W[i] := rol(W[i - 3] xor W[i - 8] xor W[i - 14] xor W[i - 16], 1); |
78 W[i] := rol(W[i - 3] xor W[i - 8] xor W[i - 14] xor W[i - 16], 1); |