Calculate the sha256 hash of the string.
Twine\Str::sha256( [ bool $mode = Twine\Config\Sha256::DEFAULT ] ) : Twine\Str
$mode | A sha256 mode flag |
Available sha256 modes
Twine\Config\Sha256::DEFAULT | Return the hash |
Twine\Config\Sha256::RAW | Return the raw binary of the hash |
$string = new Twine\Str('john pinkerton');
$string->sha256(); // Returns '7434f26c8c2fc83e57347feb2dfb235c2f47b149b54b80692beca9d565159dfd'