Struggling with CryptAuthCode function

Discussion created by cwhitty on May 16, 2017
Latest reply on Jul 24, 2017 by Alchemist



Im reasonably new to Filemaker so bear with...

Im trying to generate a hmac to send to an API Server required for activating sims.


Currently I can create what i need using the Base elements plugin;


Lower ( BE_HMAC ( $DATA ; table::secretkey ;  BE_MessageDigestAlgorithm_SHA256; "" ;  "" ) )








$DATA = "lower=&20upper=113&tariff=8&nickname=&tags=Chris Whitfield"


But as scripts to activate sims will be ran via Webdirect and Filmmaker app I can't see it working and would rather use what is already in filemaker.


So Ideally i would us the new crypt auth code function but it seems to return a file called


So to try and get the hmac retuned as text rightly or wrongly i tried this;


Base64Decode ( Base64EncodeRFC ( "4648" ; CryptAuthCode ( $DATA ; "SHA256" ; table::secretkey ) ) )


result:   *������1<n��S ����  ��� ���so


Any help will be greatly appreciated.