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

      PRINT FNsha256("Rosetta code")
      END
 
      DEF FNsha256(message$)
      LOCAL buflen%, buffer%, hcont%, hprov%, hhash%, hash$, i%
      CALG_SHA_256 = &800C
      HP_HASHVAL = 2
      CRYPT_NEWKEYSET = 8
      PROV_RSA_AES = 24
      buflen% = 128
      DIM buffer% LOCAL buflen%-1
      SYS "CryptAcquireContext", ^hcont%, 0, \
      \   "Microsoft Enhanced RSA and AES Cryptographic Provider", \
      \   PROV_RSA_AES, CRYPT_NEWKEYSET
      SYS "CryptAcquireContext", ^hprov%, 0, 0, PROV_RSA_AES, 0
      SYS "CryptCreateHash", hprov%, CALG_SHA_256, 0, 0, ^hhash%
      SYS "CryptHashData", hhash%, message$, LEN(message$), 0
      SYS "CryptGetHashParam", hhash%, HP_HASHVAL, buffer%, ^buflen%, 0
      SYS "CryptDestroyHash", hhash%
      SYS "CryptReleaseContext", hprov%
      SYS "CryptReleaseContext", hcont%
      FOR i% = 0 TO buflen%-1
        hash$ += RIGHT$("0" + STR$~buffer%?i%, 2)
      NEXT
      = hash$