Thema: Delphi Mini-SHA1

Einzelnen Beitrag anzeigen

H3llsing

Registriert seit: 12. Nov 2008
96 Beiträge
 
Delphi 2010 Enterprise
 
#8

AW: Mini-SHA1

  Alt 6. Feb 2013, 12:19
Hallo, ich wollte nochmal das uralte Thema aufgreifen.

Was für ein Datentyp ist denn Bor? ByteOfRecord?
Wie sollte man das initialisieren?

Zitat:
Delphi-Quellcode:
Class function TSHA1.toHex(Res: TSHA1Res): String;
  Const HexTable: array[0..15] of Char = '0123456789ABCDEF';

  Var A: packed array[0..19] of Byte absolute Res;
    i: Integer;

  Begin
    SetLength(Result, 40);
    Bor i := 0 to 19 do Begin
      Result[i * 2 + 1] := HexTable[A[i] shr 4];
      Result[i * 2 + 2] := HexTable[A[i] and 15];
    End;
  End;

Vielen Dank für eure Hilfe
  Mit Zitat antworten Zitat