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.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3    Statistic  

Hash.PBKDF2.HMAC

Returns the PBKDF2 hash value of the data, first applying the salt value and using the specified hashAlgorithm.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Hash 3.3 Yes Yes Yes Yes Yes
MBS( "Hash.PBKDF2.HMAC"; salt; password; iterations; desiredHashLength; hashAlgorithm { ; Flags } )   More

Parameters

Parameter Description Example value
salt The key text to use. "Hello"
password The data text to use. "World"
iterations Number of loops that the hash algorithm does. 100
desiredHashLength Number of bytes that you want the resulting hash to be. 16 or 32 bytes are commonly used. 32
hashAlgorithm The hash algorithm. Can be MD5, SHA1, SHA256 or SHA512. "MD5"
Flags Optional
Various flags you can combine by addition.
Pass 1 for getting result Base64 encoded instead of Hex encoded.
Pass 2 if salt is Hex encoded and plugin should decode it first.
Pass 4 if password is hex encoded and plugin should decode it first.
0

Result

Returns the hash or error.

Description

Returns the PBKDF2 hash value of the data, first applying the salt value and using the specified hashAlgorithm.

Same as Crypto.PBKDF2 in Xojo (Real Studio):
http://docs.realsoftware.com/index.php/Crypto.PBKDF2

Examples

Calculate password hash:

MBS( "Hash.PBKDF2.HMAC"; "Hello"; "World"; 100; 32; "SHA512")

Example result: 2CFDC277C8B84693B85E18D5A0176249EF29B74DFFDF2EE6826636F5ACBF70D0

Use SHA-3 here:

MBS( "Hash.PBKDF2.HMAC"; "Hello"; "World"; 100; 32; "RSA-SHA3-256")

Blog Entries

FileMaker Magazin

Created 18th August 2014, last changed 19th June 2020


Hash.MD5.HMAC   -   Hash.RandomHexString

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins