Sha256
From Multi Theft Auto: Wiki
Tip:
|
Calculates the sha256 hash of the specified string.
Syntax
string sha256 ( string str )
Required Arguments
- str: the string to hash.
Returns
Returns the sha256 hash of the input string if successful, false otherwise.
Requirements
Minimum supported server | 1.3.1-9.04836 |
---|---|
Minimum supported client | 1.3.1-9.04836 |
Note: Using this function requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3.1-9.04836" client="1.3.1-9.04836" />
Example
addCommandHandler ( "sha", -- Create a command function ( thePlayer, command, input ) if ( input ) then -- Check if the string exist local sha256hash = sha256( input ) -- Generate the hash outputChatBox( sha256hash ) -- Output the hash in the chat end end )
See Also
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace
- debugSleep
- decodeString
- encodeString
- fromJSON
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getFPSLimit
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getServerConfigSetting
- getTickCount
- getTimerDetails
- getTimers
- gettok
- getUserdataType
- getVersion
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setServerConfigSetting
- setTimer
- sha256
- split
- teaDecode
- teaEncode