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