PHP Class PrivateBin\Filter

Provides data filtering functions.
Afficher le fichier Open project: privatebin/privatebin Class Usage Examples

Méthodes publiques

Méthode Description
formatHumanReadableSize ( integer $size ) : string format a given number of bytes in IEC 80000-13:2008 notation (localized)
formatHumanReadableTime ( string $time ) : string format a given time string into a human readable label (localized)
slowEquals ( string $a, string $b ) : boolean fixed time string comparison operation to prevent timing attacks https://crackstation.net/hashing-security.htm?=rd#slowequals
stripslashesDeep ( mixed $value ) : mixed strips slashes deeply

Method Details

formatHumanReadableSize() public static méthode

format a given number of bytes in IEC 80000-13:2008 notation (localized)
public static formatHumanReadableSize ( integer $size ) : string
$size integer
Résultat string

formatHumanReadableTime() public static méthode

accepts times in the format "[integer][time unit]"
public static formatHumanReadableTime ( string $time ) : string
$time string
Résultat string

slowEquals() public static méthode

fixed time string comparison operation to prevent timing attacks https://crackstation.net/hashing-security.htm?=rd#slowequals
public static slowEquals ( string $a, string $b ) : boolean
$a string
$b string
Résultat boolean

stripslashesDeep() public static méthode

strips slashes deeply
public static stripslashesDeep ( mixed $value ) : mixed
$value mixed
Résultat mixed