| 1 | <?php |
||
| 5 | class XHubSignature |
||
| 6 | { |
||
| 7 | const ALGORITHM = "sha1"; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @param string $payload |
||
| 11 | * @param string $secret |
||
| 12 | * @param string $signature |
||
| 13 | * |
||
| 14 | * @return bool |
||
| 15 | */ |
||
| 16 | 4 | public static function validate($payload, $secret, $signature) |
|
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $payload |
||
| 23 | * @param string $secret |
||
| 24 | * |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | 14 | public static function compute($payload, $secret) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $header |
||
| 34 | * |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | 4 | public static function parseHeader($header) |
|
| 41 | } |
||
| 42 |