PHP: How can I generate a HmacSHA256 signature of a string

前端 未结 4 1520
误落风尘
误落风尘 2020-12-08 06:18

Is there any way to create a HmacSHA256 signature of a string in php?

4条回答
  •  囚心锁ツ
    2020-12-08 07:14

    I can't answer due to lack of reputation, but @Melomans way in combination with ZPiDER's answer leads to using only

    $hash       = hash_hmac('sha256', $string, $secret);
    

    for a correct Datatrans signing

提交回复
热议问题