Services webmasters
Partenaires
Jeux concours gratuits
 
sha1_file
<<<
sha1 similar_text
>>>

7.101 Chaînes de caractères (Strings)
7 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Constantes prédefinies
Voir aussi
addcslashes
addslashes
bin2hex
chop
chr
chunk_split
convert_cyr_string
count_chars
crc32
crypt
echo
explode
fprintf
get_html_translation_table
hebrev
hebrevc
html_entity_decode
htmlentities
htmlspecialchars
implode
join
levenshtein
localeconv
ltrim
md5_file
md5
metaphone
money_format
nl_langinfo
nl2br
number_format
ord
parse_str
print
printf
quoted_printable_decode
quotemeta
rtrim
setlocale
sha1_file
->sha1
similar_text
soundex
sprintf
sscanf
str_ireplace
str_pad
str_repeat
str_replace
str_rot13
str_shuffle
str_split
str_word_count
strcasecmp
strchr
strcmp
strcoll
strcspn
strip_tags
stripcslashes
stripos
stripslashes
stristr
strlen
strnatcasecmp
strnatcmp
HREF="function.strtoupper.php">strtoupper
strtr
substr_count
substr_replace
substr
trim
ucfirst
ucwords
vprintf
vsprintf
wordwrap

7.101.46 sha1()Calcule le sha1 d'une chaîne de caractères

[ Exemples avec sha1 ]   PHP 4 >= 4.3.0

string  sha1 ( string   str , bool   raw_output )

sha1 calcule le sha1 de la chaîne de caractères str en utilisant US Secure Hash Algorithm 1 , puis retourne cette valeur. Un sha1 est un nombre hexadécimal de 40 caractères.

Exemple avec sha1

<?php
$str
= 'pomme';
                     
if (
sha1($str) === '752c14ea195c460bac3c3b7896975ee9fd15eeb7') {
    echo
"Voulez-vous une golden ou une spartan?";
    exit;
}
?>

Voir aussi sha1_file , crc32 et md5

<< sha1 >>
sha1_file Chaînes de caractères (Strings) similar_text
Services webmasters
Les manuels
 
CoursPHP.com - Reproduction interdite -