Brian Dunning's FileMaker Custom Functions

ShannonEntropy ( text )

A function for calculating the entropy of a string - how difficult is it to encode.

  Average rating: 4.0 (3 votes) Log in to vote

Richard Dyce   Richard Dyce
Dyce & Sons LTD.
http://dyce.com

Share on Facebook Share on Twitter

  Sample input:
ShannonEntropy ( "aaaaaa" )

ShannonEntropy ( "aaaabb" )

ShannonEntropy ( "abcdefg" )

ShannonEntropy ( "This is some text. It is very long" )

  Sample output:
0

.9182958340544895

2.8073549220576048

3.7958114600475881

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

The Shannon Entropy is the minimal number of bits per symbol needed to encode the information in binary form. It's a good rule of thumb measure of how strong your password is ;-)

 

Comments

Peter Gerlings   Peter Gerlings, Amsterdam
Jan 1, 2018
This seems to reference two custom functions. I can find one by the same author on this site, but I can’t find one for “ApplyToList”. If the author sees this, please provide references to the appropriate subroutines. This would be very useful for me, but I can’t get it to work.

Thanks!
 
Richard Dyce   Richard Dyce, Dyce & Sons LTD.
Jan 1, 2018
The ApplyToList() function is the standard function by Debi Fuchs: http://www.briandunning.com/cf/899
 
Peter Gerlings   Peter Gerlings, Amsterdam
Jan 7, 2018
Thanks!
 

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.

Under construction. Email me your wish list for improvements.