PHP Class Airship\Engine\Security\HiddenString

This is just to hide sensitive strings from stack traces, etc.
Show file Open project: paragonie/airship Class Usage Examples

Protected Properties

Property Type Description
$allowInline boolean
$internalStringValue string

Public Methods

Method Description
__construct ( string $value, boolean $allowInline = false ) HiddenString constructor.
__debugInfo ( ) : array Hide its internal state from var_dump()
__destruct ( ) Wipe it from memory after it's been used.
__toString ( ) : string Prevent accidental echoing of a hidden string
getString ( ) : string Explicit invocation -- get the raw string value

Method Details

__construct() public method

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

__debugInfo() public method

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

__destruct() public method

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

__toString() public method

Prevent accidental echoing of a hidden string
public __toString ( ) : string
return string

getString() public method

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

Property Details

$allowInline protected property

protected bool $allowInline
return boolean

$internalStringValue protected property

protected string $internalStringValue
return string