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