PHP 클래스 ParagonIE\Halite\HiddenString

The purpose of this class is to encapsulate strings and hide their contents from stack traces should an unhandled exception occur in a program that uses Halite. The only things that should be protected: - Passwords - Plaintext (before encryption) - Plaintext (after decryption) This library makes heavy use of return-type declarations, which are a PHP 7 only feature. Read more about them here:
파일 보기 프로젝트 열기: paragonie/halite 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$disallowInline boolean Disallow the contents from being accessed via __toString()?
$disallowSerialization boolean Disallow the contents from being accessed via __sleep()?
$internalStringValue string

공개 메소드들

메소드 설명
__construct ( string $value, boolean $disallowInline = false, boolean $disallowSerialization = false ) HiddenString constructor.
__debugInfo ( ) : array Hide its internal state from var_dump()
__destruct ( ) Wipe it from memory after it's been used.
__sleep ( ) : array
__toString ( ) : string Returns a copy of the string's internal value, which should be zeroed.
getString ( ) : string Explicit invocation -- get the raw string value

메소드 상세

__construct() 공개 메소드

HiddenString constructor.
public __construct ( string $value, boolean $disallowInline = false, boolean $disallowSerialization = false )
$value string
$disallowInline boolean
$disallowSerialization boolean

__debugInfo() 공개 메소드

Hide its internal state from var_dump()
public __debugInfo ( ) : array
리턴 array

__destruct() 공개 메소드

Wipe it from memory after it's been used.
public __destruct ( )

__sleep() 공개 메소드

public __sleep ( ) : array
리턴 array

__toString() 공개 메소드

Optionally, it can return an empty string.
public __toString ( ) : string
리턴 string

getString() 공개 메소드

Explicit invocation -- get the raw string value
public getString ( ) : string
리턴 string

프로퍼티 상세

$disallowInline 보호되어 있는 프로퍼티

Disallow the contents from being accessed via __toString()?
protected bool $disallowInline
리턴 boolean

$disallowSerialization 보호되어 있는 프로퍼티

Disallow the contents from being accessed via __sleep()?
protected bool $disallowSerialization
리턴 boolean

$internalStringValue 보호되어 있는 프로퍼티

protected string $internalStringValue
리턴 string