Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function __construct($bucket, $secret, $acl = "public-read", $expireAt = "+1 hours", $successStatus = 201) |
||
24 | { |
||
25 | $this->acl = $acl; |
||
26 | $this->bucket = $bucket; |
||
27 | $this->expireAt = $expireAt; |
||
28 | $this->successStatus = $successStatus; |
||
29 | |||
30 | $policy = $this->generatePolicy(); |
||
31 | $this->base64Policy = base64_encode($policy); |
||
32 | $this->signature = base64_encode(hash_hmac('sha1', $this->base64Policy, $secret, $raw_output = true)); |
||
33 | } |
||
34 | |||
78 |