crypto.sha256

Type Constant
Library crypto.*
Revision Release 2024.3703
Keywords crypto, SHA-256

Overview

Constant used to specify the SHA-256 algorithm.

Syntax

crypto.sha256

Gotchas

The crypto.digest() and crypto.hmac() functions are supported on a per-platform basis as follows:

Platform crypto.digest() crypto.hmac()
Android
iOS
macOS
Windows Desktop

Example

local crypto = require( "crypto" )
local hash = crypto.digest( crypto.sha256, "test" )
print( hash )   --> 9f86...(etc)...0a08