first commit

This commit is contained in:
2024-04-01 09:54:43 +08:00
commit 899d816bc3
795 changed files with 130040 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace Yeepay\Yop\Sdk\Auth;
use Yeepay\Yop\Sdk\Security\DigestAlg;
class AuthorizationReqSupport
{
/**
* @var array
*/
private static $supportedAuthorizationReqs;
static function init()
{
self::$supportedAuthorizationReqs =
[
"YOP-RSA2048-SHA256" => new AuthorizationReq("RSA", "RSA2048", "SHA256withRSA", DigestAlg::SHA256,
"YOP-RSA2048-SHA256"),
"YOP-RSA2048-SHA512" => new AuthorizationReq("RSA", "RSA2048", "SHA512withRSA", DigestAlg::SHA512,
"YOP-RSA2048-SHA512"),
];
}
/**
* @param string $securityReqName
* @return AuthorizationReq
*/
static function getAuthorizationReq($securityReqName)
{
return self::$supportedAuthorizationReqs[$securityReqName];
}
}
AuthorizationReqSupport::init();