Completed
Push — master ( 37f24f...c12d0a )
by cam
04:22
created

sha256.inc.php ➔ sha256()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Main routine called from an application using this include.
5
 *
6
 * General usage:
7
 *   require_once('sha256.inc.php');
8
 *   $hashstr = spip_sha256('abc');
9
 *
10
 * @param string $str Chaîne dont on veut calculer le SHA
11
 * @return string Le SHA de la chaîne
12
 */
13
function spip_sha256($str) {
14
	return hash('sha256', $str);
15
}
16
17
/**
18
 * @param string $str Chaîne dont on veut calculer le SHA
19
 * @param bool $ig_func
20
 * @return string Le SHA de la chaîne
21
 * @deprecated 4.0
22
 * @see spip_sha256()
23
 */
24
function _nano_sha256($str, $ig_func = true) {
0 ignored issues
show
Unused Code introduced by
The parameter $ig_func is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
	return spip_sha256($str);
26
}
27