Brian Dunning's FileMaker Custom Functions

MD5 ( String )

MD5 hash of any content (string, number, container)

  Average rating: 4.5 (31 votes) Log in to vote

Tom Guise   Tom Guise - Show more from this author
Smart Wolf
https://www.smartwolf.co.uk

Share on Facebook Share on Twitter

  Sample input:
MD5 ( "HashThisString" )
  Sample output:
27cc5f0cb636d32cded060372d0a47be

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

REQUIRES FILEMAKER 13

Function uses the new native MD5 container attribute to force a hash of any given string, number or container content.

 

Comments

Daniele Raybaudi   Daniele Raybaudi, ACI
Oct 18, 2014
If it returns the MD5 of any text, number or contents of a container field, why do you plan the event of an error?
 
Tom Guise   Tom Guise, Smart Wolf
Oct 18, 2014
If you pass any empty string, it will return an error unless captured.
 
Daniele Raybaudi   Daniele Raybaudi, ACI
Oct 18, 2014
d41d8cd98f00b204e9800998ecf8427e

is the MD5 of an empty string
 
Daniele Raybaudi   Daniele Raybaudi, ACI
Oct 18, 2014
This icould be, for examle, the calculation for an auto-entered MD5:

Case(
not IsEmpty ( Self ) ; Lower ( GetContainerAttribute ( Self ; "md5" ) ) ;
"d41d8cd98f00b204e9800998ecf8427e"
)
 
Tom Guise   Tom Guise, Smart Wolf
Nov 4, 2014
Agreed, but for my use of this function I would prefer the result to be empty where an empty parameter has been passed.

Thanks for the input!
 
Bruce Robertson   Bruce Robertson
Aug 13, 2015
Regarding empty string. When I try it, I get an error:

getContainerAttribute( ""; "MD5")

=> ?
 

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 20 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: