• PHP Video Tutorials

PHP - Function Sha1



Syntax

string sha1 ( string $str [, bool $raw_output = false ] )

Definition and Usage

It is used to calculate the sha1 hash of a string

Return Values

It returns the sha1 hash of a string

Parameters

Sr.No Parameters & Description
1

filename

It contains the information about the filename of the file to hash

2

raw_output

It is a boolean value that indicates the output

Example

Try out the following example

<?php
   $input = "tutorialspoint";
   echo sha1($input);
?>

This will produce following result −

43aeef3e6b34a52281c6f7ce49f43a94e009dda5
php_function_reference.htm
Advertisements