PHP Class 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:
Mostra file
Open project: paragonie/halite
Class Usage Examples
Protected Properties
Public Methods
Method Details
__construct()
public method
HiddenString constructor.
__debugInfo()
public method
Hide its internal state from var_dump()
__destruct()
public method
Wipe it from memory after it's been used.
__toString()
public method
Optionally, it can return an empty string.
getString()
public method
Explicit invocation -- get the raw string value
Property Details
$disallowInline protected_oe property
Disallow the contents from being accessed via __toString()?
protected bool $disallowInline |
return |
boolean |
|
$disallowSerialization protected_oe property
Disallow the contents from being accessed via __sleep()?
protected bool $disallowSerialization |
return |
boolean |
|
$internalStringValue protected_oe property
protected string $internalStringValue |
return |
string |
|