Blame view

vendor/alibabacloud/client/src/Clients/RsaKeyPairClient.php 740 Bytes
f0d6cde5   xu   vendor
1
2
3
4
<?php

namespace AlibabaCloud\Client\Clients;

f0d6cde5   xu   vendor
5
6
use AlibabaCloud\Client\Exception\ClientException;
use AlibabaCloud\Client\Signature\ShaHmac1Signature;
0c34aba8   xu   更新阿里云短信接口
7
use AlibabaCloud\Client\Credentials\RsaKeyPairCredential;
f0d6cde5   xu   vendor
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

/**
 * Use the RSA key pair to complete the authentication (supported only on Japanese site)
 *
 * @package   AlibabaCloud\Client\Clients
 */
class RsaKeyPairClient extends Client
{

    /**
     * @param string $publicKeyId
     * @param string $privateKeyFile
     *
     * @throws ClientException
     */
    public function __construct($publicKeyId, $privateKeyFile)
    {
        parent::__construct(
            new RsaKeyPairCredential($publicKeyId, $privateKeyFile),
            new ShaHmac1Signature()
        );
    }
}