crypto.sha256

Type Constant
Library crypto.*
Revision Current Public Release (2017.3068)
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
Windows Phone 8

Example

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