crypto.sha1

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

Overview

Constant used to specify the SHA-1 algorithm.

Syntax

crypto.sha1

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.sha1, "test" )
print( hash )   --> a94a8fe5ccb19ba61c4c0873d391e987982fbbd3