Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Modding Tools
  • Simpsons Hit & Run Multiplayer Server
  • Lua API Reference
  • Cryptography Functions

Cryptography.SHA256

Available since Version 1.0.

Takes a string and returns its SHA256 hash as a hexadecimal string.

Syntax

Cryptography.SHA256( input )

Arguments

  • input (string): The string to hash.

Return Values

(string): The SHA256 hash of the input string as a hexadecimal string.

Examples

local hash = Cryptography.SHA256("Hello, world!")
print(hash) -- Outputs: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3