Properties

$_uniqueId

$_uniqueId : 

Type

$_conf

$_conf : 

Type

$_appConf

$_appConf : 

Type

$_privatekey

$_privatekey : \framework\components\security\unknown

私钥

Type

\framework\components\security\unknown

$_publickey

$_publickey : \framework\components\security\unknown

公钥

Type

\framework\components\security\unknown

Methods

__construct()

__construct(  $conf = array()) 

Parameters

$conf

unInstallNow()

unInstallNow(  $isComplete = false) 

Parameters

$isComplete

getConfPack()

getConfPack() 

setUniqueId()

setUniqueId(  $name) 

Parameters

$name

getConf()

getConf() 

getAppConf()

getAppConf() 

triggerThrowable()

triggerThrowable(\Throwable  $e) 

Parameters

\Throwable $e

handleThrowable()

handleThrowable(\Throwable  $e) 

Parameters

\Throwable $e

encrypt()

encrypt(\framework\components\security\unknown  $data, string  $padding = OPENSSL_PKCS1_PADDING) 

进行公钥加密

Parameters

\framework\components\security\unknown $data
string $padding

decrypt()

decrypt(\framework\components\security\unknown  $data, string  $padding = OPENSSL_PKCS1_PADDING) : string

私钥揭秘数据

Parameters

\framework\components\security\unknown $data
string $padding

Returns

string

gign()

gign(\framework\components\security\unknown  $data,   $sign_alt = OPENSSL_ALGO_SHA256) : string|NULL

私钥签名数据

Parameters

\framework\components\security\unknown $data
$sign_alt

Returns

string|NULL

verify()

verify(\framework\components\security\unknown  $data, \framework\components\security\unknown  $sign,   $sign_alt = OPENSSL_ALGO_SHA256) : boolean

公钥验证数据

Parameters

\framework\components\security\unknown $data
\framework\components\security\unknown $sign
$sign_alt

Returns

boolean

__destruct()

__destruct() 

释放对应的秘钥

getComponent()

getComponent(  $haver,   $componentName,   $params = array()) 

Parameters

$haver
$componentName
$params

unInstall()

unInstall(  $isComplete = false) 

Parameters

$isComplete

getValueFromConf()

getValueFromConf(  $key,   $default = '') 

Parameters

$key
$default

init()

init() 

getKeyFromFile()

getKeyFromFile(\framework\components\security\unknown  $path) 

获取秘钥

Parameters

\framework\components\security\unknown $path

initPrvKey()

initPrvKey() 

初始化私钥

initPublicKey()

initPublicKey() 

初始化公钥