ShaHmac1Signer.php 340B

1234567891011121314151617181920
  1. <?php
  2. namespace Aliyun\Core\Auth;
  3. class ShaHmac1Signer implements ISigner
  4. {
  5. public function signString($source, $accessSecret)
  6. {
  7. return base64_encode(hash_hmac('sha1', $source, $accessSecret, true));
  8. }
  9. public function getSignatureMethod() {
  10. return "HMAC-SHA1";
  11. }
  12. public function getSignatureVersion() {
  13. return "1.0";
  14. }
  15. }