Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Returns the a SHA1 HMAC based on the key and the data string.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Hash | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
key | The key text to use. | "Hello" | |
data | The data text to use. | "World" | |
Flags | Various flags you can combine by addition. Pass 1 for getting result Base64 encoded instead of Hex encoded. Pass 2 if key is Hex encoded and plugin should decode it first. Pass 4 if data is hex encoded and plugin should decode it first. Pass 8 for base64URL encoding. (new in v10.3) |
0 | Optional |
Returns the hash string.
Hash empty string
MBS( "Hash.SHA1.HMAC"; ""; "" )
Example result: FBDB1D1B18AA6C08324B7D64B71FB76370690E1D
Hash a test string
MBS( "Hash.SHA1.HMAC"; "key"; "The quick brown fox jumps over the lazy dog")
Example result: DE7C9B85B8B78AA6BC8A7A36F70A90701C9DB4D9
FileMaker 16 vs. Plugin:
# MBS Plugin:
MBS( "Hash.SHA1.HMAC"; "Key"; "Data")
# Same via FileMaker 16 native:
HexEncode( CryptAuthCode ( "Data" ; "SHA1" ; "Key" ))
This function is free to use.
Created 18th August 2014, last changed 22nd May 2020