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:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Calculated SHA-256 hash of given text.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Hash | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
text | The text to process. | "Hello World" | |
Flags | Various flags you can combine by addition. Pass 1 for getting result Base64 encoded instead of Hex encoded. Pass 2 if input data is Hex encoded and plugin should decode it first. Pass 8 for base64URL encoding. (new in v10.3) |
0 | Optional |
Returns SHA-256 hash.
Calculate hash of password:
MBS( "Hash.SHA256"; $password )
Calculate empty text hash:
MBS("Hash.SHA256"; "")
Example result: E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
Calculate hash:
MBS("Hash.SHA256"; "The quick brown fox jumps over the lazy dog")
Example result: D7A8FBB307D7809469CA9ABCB0082E4F8D5651E46D3CDB762D02D0BF37C9E592
FileMaker 16 vs. Plugin:
# MBS Plugin:
MBS( "Hash.SHA256"; "Hello World")
# Same via FileMaker 16 native:
HexEncode( CryptDigest ( "Hello World"; "SHA256" ))
Hash a file with newer or older way:
#newer function:
Set Variable [$hash1; Value: MBS( "Hash.DigestFile"; "SHA256"; "/Users/cs/Desktop/test.xml"; "base64") ]
#older way:
Set Variable [$hash2; Value: MBS( "Hash.SHA256"; MBS("Text.ReadTextFile"; "/Users/cs/Desktop/test.xml"; "UTF-8"); 1)]
Created 18th August 2014, last changed 11st March 2021
Hash.SHA1.HMAC - Hash.SHA256.HMAC
Feedback: Report problem or ask question.