Brian Dunning's FileMaker Custom Functions

Hash ( SourceText ; SaltText ; HashAlgorithm ; LengthToExpandSalt ; NumStretch )

Generate salted & stretched hex encoded hash string.

  Be the first to rate this function Log in to vote

Koji Takeuchi   Koji Takeuchi - Show more from this author
TonicNote, Inc.
https://tonicnote.com

Share on Facebook Share on Twitter

  Sample input:
Hash ( "password" ; "Koji Takeuchi" ; "SHA256" ; 1024 ; 1024 )
  Sample output:
"54b6f7193cf5944f653d3f69b9484f8aa9a6c90107841cb8437477e426cf67c6"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

description:
Generate salted & stretched hex encoded hash string.
Salt will be modified a little and expanded before it is used.
Params:
SourceText Source text to hash.
SaltText Salt string. ( "" means no salt.)
HashAlgorithm Algorithm which can be used in CryptDigest function. (ex. "SHA256")
LengthToExpandSalt Length of modified/expanded salt. (ex. 1024)
NumStretch Number of times stretch. (ex. 1024, "" means 0)

Example:
Hash ( "password" ; "Koji Takeuchi" ; "SHA256" ; 1024 ; 1024 )
-> "54b6f7193cf5944f653d3f69b9484f8aa9a6c90107841cb8437477e426cf67c6"
Hash ( "password" ; "Koji Takeuchi" ; "SHA256" ; "" ; "" )
-> "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: