1 | <?php |
||
9 | class Signature { |
||
10 | /** |
||
11 | * 获取分块上传接口的签名 |
||
12 | */ |
||
13 | const SIGN_MULTIPART = 1; |
||
14 | /** |
||
15 | * 生成视频处理接口的签名 |
||
16 | */ |
||
17 | const SIGN_VIDEO = 2; |
||
18 | /** |
||
19 | * 生成视频处理接口的签名(不需要操作员时使用) |
||
20 | */ |
||
21 | const SIGN_VIDEO_NO_OPERATOR = 3; |
||
22 | |||
23 | /** |
||
24 | * 获取 RESET API 请求需要的签名头 |
||
25 | * |
||
26 | * @param Config $bucketConfig |
||
27 | * @param $method |
||
28 | * @param $path |
||
29 | * @param $contentLength |
||
30 | * |
||
31 | * @return array |
||
32 | */ |
||
33 | public static function getRestApiSignHeader($bucketConfig, $method, $remotePath, $contentLength) { |
||
46 | |||
47 | /** |
||
48 | * 获取请求缓存刷新接口需要的签名头 |
||
49 | * |
||
50 | * @param Config $bucketConfig |
||
51 | * @param $urlString |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | public static function getPurgeSignHeader( Config $bucketConfig, $urlString) { |
||
64 | |||
65 | public static function getFormSignature(Config $bucketConfig, $data) { |
||
74 | |||
75 | public static function getSignature( Config $bucketConfig, $data, $type, $tokenSecret = '') { |
||
101 | } |