Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function generateHash(array $params): string |
||
33 | { |
||
34 | $messageSignatureContent = implode('', $params); |
||
35 | $hmac = hash_hmac( |
||
36 | $this->firstDataConfig->getHashAlgo(), |
||
37 | $messageSignatureContent, |
||
38 | $this->firstDataConfig->getFirstDataApiSecret() |
||
39 | ); |
||
40 | |||
41 | return base64_encode($hmac); |
||
42 | } |
||
44 |