SHA-256 is the recommended stronger alternative to SHA-1. See FIPS PUB 180-4 for implementation details.

Either by using a dedicated library or implementing the algorithm in your language, show that the SHA-256 digest of the string "Rosetta code" is: 764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf

program rosettaCodeSHA256;
 
uses
  SysUtils, DCPsha256;
 
var
  ros: String;
  sha256 : TDCP_sha256;
  digest : array[0..63] of byte;
  i: Integer;
  output: String;
begin
  ros := 'Rosetta code';
 
  sha256 := TDCP_sha256.Create(nil);
  sha256.init;
  sha256.UpdateStr(ros);
  sha256.Final(digest);
 
  output := '';
 
  for i := 0 to 31 do begin
    output := output + intToHex(digest[i], 2);
  end;
 
  writeln(lowerCase(output));
 
end.