Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Hash.RandomHexString
Creates a random hex string.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Hash | 3.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "Hash.RandomHexString"; Length ) More
Parameters
Parameter | Description | Example |
---|---|---|
Length | The length of the text to return in characters. Result string with be double that size as it is hex. | 32 |
Result
Returns text.
Description
Creates a random hex string.You can use this strings for hash seeds.
Examples
Creates 8 byte string:
MBS( "Hash.RandomHexString"; 8 )
Create a random password to pass to user:
Set Variable [$password; Value: MBS( "Hash.RandomHexString"; 16 ) ]
Create a random password to pass to user:
Set Variable [$password; Value:
MBS( "Hash.RandomHexString"; 3 ) & "-" &
MBS( "Hash.RandomHexString"; 3 ) & "-" &
MBS( "Hash.RandomHexString"; 3 ) ]
See also
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 23th February 2024