Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Hash.RandomString
Creates a random string.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Hash | 3.1 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| Length | The length of the text to return in characters. | 32 | |
| Characters | Optional, a list of characters to use instead of default set. | "1234" | Optional |
Result
Returns text.
Description
Creates a random string.User Characters: a to z, A to Z and 0 to 9.
You can use this strings for hash seeds or as password suggestions.
Examples
Creates 8 byte string:
MBS( "Hash.RandomString"; 8 )
Create random text with only digits:
MBS("Hash.RandomString"; 32; "1234567890")
Create random hex number:
MBS("Hash.RandomString"; 32; "1234567890ABCDEF")
Create random password using digits and punctuation:
MBS("Hash.RandomString"; 10; "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!@#$%^&*-_+=.")
See also
Example Databases
Blog Entries
Release notes
- Version 8.3
- Improved randomness for Hash.RandomString function.
Created 18th August 2014, last changed 14th January 2015
Hash.RandomHexString - Hash.SHA1
Feedback: Report problem or ask question.
Links
MBS Xojo blog