hash-maar-dan-veiliger
Gesponsorde koppelingen
PHP script bestanden
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
function create_hash( $str )
{
if( is_array( $str ) )
{
$str = array2string( $str );
}
$str = str_split( $str );
$chunkStr = md5( 'een geheim woord met veel rare tekens #)%*Qfvdvdk8439312' );
for( $i = 0; $i < count( $str ); $i++ )
{
$chunkStr .= md5( $str[ $i ] );
}
$str = md5( sha1( base64_encode( $chunkStr ) ) );
return $str;
}
if (phpversion () < "5"){ // define PHP5 functions if server uses PHP4
function str_split($text, $split = 1)
{
if (!is_string($text)) return false;
if (!is_numeric($split) && $split < 1) return false;
$len = strlen($text);
$array = array();
$s = 0;
$e=$split;
while ($s <$len)
{
$e=($e <$len)?$e:$len;
$array[] = substr($text, $s,$e);
$s = $s+$e;
}
return $array;
}
}
?>
function create_hash( $str )
{
if( is_array( $str ) )
{
$str = array2string( $str );
}
$str = str_split( $str );
$chunkStr = md5( 'een geheim woord met veel rare tekens #)%*Qfvdvdk8439312' );
for( $i = 0; $i < count( $str ); $i++ )
{
$chunkStr .= md5( $str[ $i ] );
}
$str = md5( sha1( base64_encode( $chunkStr ) ) );
return $str;
}
if (phpversion () < "5"){ // define PHP5 functions if server uses PHP4
function str_split($text, $split = 1)
{
if (!is_string($text)) return false;
if (!is_numeric($split) && $split < 1) return false;
$len = strlen($text);
$array = array();
$s = 0;
$e=$split;
while ($s <$len)
{
$e=($e <$len)?$e:$len;
$array[] = substr($text, $s,$e);
$s = $s+$e;
}
return $array;
}
}
?>