anchor.diff:  end;
   
   function HMAC_SHA1_EX( const Data: String;
  -			 const Key : String ): String;
  +                       const Key : String ): String;
   var  Digest: SHA1Digest;
   begin
      HMAC_SHA1( Data[1], length(Data), Key[1], length(Key), Digest );
  
positive.code: ------------------------------------------------------------------------------}
  
  
  unit Sha1; // "US Secure Hash Algorithm 1 (SHA1)" (RFC3174)
  
  {------------------------------------------------------------------------------
  
     Based on the reference implementation in RFC 3174
  
  ------------------------------------------------------------------------------}
  
  interface
  
  {$R-}
  {$Q-}
  
  uses SysUtils, Classes;
  
  const
     shaSuccess      = 0;
     shaNull         = 1;
     shaInputTooLong = 2;
     shaStateError   = 3;
     SHA1HashSize    = 20;
  
  type
     uint32_t      = Cardinal; // unsigned 32 bit integer
     uint8_t       = Byte;     // unsigned 8 bit integer (i.e., unsigned char)
     int_least16_t = LongInt;  // integer of >= 16 bits
  
     SHA1Digest = array[0..SHA1HashSize-1] of Char;
     SHA1DigestString = AnsiString;  // string containing 20 chars
  
     // This structure will hold context information for the SHA-1
     // hashing operation
     SHA1Context = record
  	Intermediate_Hash: array[0..SHA1HashSize div 4-1] of uint32_t; // Message Digest
  	Length_Low : uint32_t;                  // Message length in bits
  	Length_High: uint32_t;                  // Message length in bits
  	Message_Block_Index: int_least16_t;     // Index into message block array
  	Message_Block: array[0..63] of uint8_t; // 512-bit message blocks
  	Computed: Integer;                      // Is the digest computed?
        Corrupted: Integer;                     // Is the message digest corrupted?
     end;
  
  function SHA1Reset ( var context       : SHA1Context ): Integer;
  function SHA1Input ( var context       : SHA1Context;
                       message_array     : PChar;
  			   length            : Cardinal ): Integer;
  function SHA1Result( var context       : SHA1Context;
                       var Message_Digest: SHA1Digest ): Integer;
  
  
negative.code: SHA1 test suit:
  procedure TForm1.Button1Click(Sender: TObject);
  const TEST1   = 'abc';
        TEST2a  = 'abcdbcdecdefdefgefghfghighijhi';
        TEST2b  = 'jkijkljklmklmnlmnomnopnopq';
        TEST2   = TEST2a + TEST2b;
        TEST3   = 'a';
  