You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
740 B
31 lines
740 B
5 months ago
|
<?php
|
||
|
|
||
|
namespace AlibabaCloud\Client\Clients;
|
||
|
|
||
|
use AlibabaCloud\Client\Exception\ClientException;
|
||
|
use AlibabaCloud\Client\Signature\ShaHmac1Signature;
|
||
|
use AlibabaCloud\Client\Credentials\RsaKeyPairCredential;
|
||
|
|
||
|
/**
|
||
|
* 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()
|
||
|
);
|
||
|
}
|
||
|
}
|