\Alipay\KeyAlipayPrivateKey

Summary

Methods
Properties
Constants
create()
__destruct()
__clone()
isLoaded()
asResource()
asString()
fromResource()
toString()
getKey()
serialize()
unserialize()
No public properties found
No constants found
__construct()
load()
release()
$resource
N/A
No private methods found
No private properties found
N/A

Properties

$resource

$resource : 

Type

Methods

create()

create(string  $key) : static

创建密钥

Parameters

string $key

Returns

static

__destruct()

__destruct() 

__clone()

__clone() : void

深拷贝需要重新加载密钥

isLoaded()

isLoaded() : boolean

检查此密钥是否可用

Returns

boolean

asResource()

asResource() : resource

获取真实的密钥资源

Returns

resource

asString()

asString() : string

获取密钥字符串

Returns

string

fromResource()

fromResource(resource  $resource) : static

使用密钥资源直接初始化本对象

Parameters

resource $resource

Returns

static

toString()

toString(resource  $resource) : string

将密钥资源转为字符串

Parameters

resource $resource

Returns

string

getKey()

getKey(string  $certificate) : resource

加载密钥资源

Parameters

string $certificate

Returns

resource

serialize()

serialize() 

unserialize()

unserialize(  $data) 

Parameters

$data

__construct()

__construct() 

load()

load(string  $certificate) : void

加载密钥

Parameters

string $certificate

密钥字符串或密钥路径

Throws

\Alipay\Exception\AlipayInvalidKeyException

release()

release() : void

释放密钥资源