\SM3SM3

入口类 Class Sm3

Summary

Methods
Properties
Constants
__construct()
__toString()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
No public properties found
IV
No protected methods found
No protected properties found
N/A
sm3()
$message
$hash_value
N/A

Constants

IV

IV = '7380166f4914b2b9172442d7da8a0600a96f30bc163138aae38dee4db0fb0e4e' : string

Properties

$message

$message : string

Type

string — 消息(加密前的结果)

$hash_value

$hash_value : string

Type

string — 杂凑值(加密后的结果)

Methods

__construct()

__construct(  $message) 

实例化时直接调用将参数传给主方法 Sm3 constructor.

Parameters

$message

string 传入的消息

Throws

\Exception

__toString()

__toString() : string

方便直接输出实例化的对象

Throws

\Exception

Returns

string

offsetExists()

offsetExists(mixed  $offset) : boolean

Whether a offset exists

Parameters

mixed $offset

An offset to check for.

Returns

boolean —

true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

offsetGet()

offsetGet(mixed  $offset) : mixed

Offset to retrieve

Parameters

mixed $offset

The offset to retrieve.

Returns

mixed —

Can return all value types.

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : \SM3\SM3

Offset to set

Parameters

mixed $offset

The offset to assign the value to.

mixed $value

The value to set.

Returns

\SM3\SM3

offsetUnset()

offsetUnset(mixed  $offset) : void

Offset to unset

Parameters

mixed $offset

The offset to unset.

sm3()

sm3() : string

主方法

Returns

string