| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 5 | public function buildSignature(string $signatureBase, Consumer $consumer, Token $token) |
|
| 28 | { |
||
| 29 | 5 | $parts = [$consumer->getSecret(), $token->getSecret()]; |
|
| 30 | |||
| 31 | 5 | $parts = Util::urlencodeRFC3986($parts); |
|
| 32 | 5 | $key = implode('&', $parts); |
|
| 33 | |||
| 34 | 5 | return base64_encode(hash_hmac('sha1', $signatureBase, $key, true)); |
|
| 35 | } |
||
| 37 |