Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function sign($path, array $runtimeConfig = null) |
||
33 | { |
||
34 | if ($runtimeConfig) { |
||
35 | array_walk_recursive($runtimeConfig, function (&$value) { |
||
36 | $value = (string) $value; |
||
37 | }); |
||
38 | } |
||
39 | |||
40 | return mb_substr(preg_replace('/[^a-zA-Z0-9-_]/', '', base64_encode(hash_hmac('sha256', ltrim($path, '/').(null === $runtimeConfig ?: serialize($runtimeConfig)), $this->secret, true))), 0, 8); |
||
41 | } |
||
42 | |||
51 |