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

[indent=4]
/*
   SHA-256 in Genie
 
   valac SHA-256.gs
   ./SHA-256
*/
 
init
    var msg = "Rosetta code"
    var digest = Checksum.compute_for_string(ChecksumType.SHA256, msg, -1)
    print msg
    print digest
 
    assert(digest == "764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf")