AnsweredAssumed Answered

CryptDigest and the problem with the multiline data parameter

Question asked by andrewpokora on Jan 4, 2019
Latest reply on Jan 5, 2019 by fmpdude

I'm trying to integrate FileMaker with Amazon A3. I don't use plugins, because I want to implement the functionality I need only with standard FileMaker functions. I faced the following problem.


For authorization on S3, it is necessary to calculate the signature. The signature is a SHA256 Hash (the link to documentation and examples of data: At the bottom of this page, there is an example with data (see attachment). I'm targeting him to see if I'm calculating the signature correctly. In FileMaker I calculate it as follows:


HexEncode ( CryptDigest ( $data ; "SHA256" ) )


If I use a single row as data, everything works fine. The problem came about when the $data should be a FEW lines. For example, the Amazon documentation has the following example:









Function Crypt Digest in FileMaker returns this result:




However, the Amazon example should have the following:




I checked the result in the online calculator and get following:




Since this is the same as the result given in the Amazon example, I tend to think that I'm doing something wrong in FileMaker.  The documentation on Amazon talks about the “\n " character to move to the next line. In FileMaker, I tried using “\n”, the symbol "¶", but without any success.


What am I doing wrong? Does anyone have experience passing a multiline data parameter?