ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilBMFType_hexBinary Class Reference
+ Collaboration diagram for ilBMFType_hexBinary:

Public Member Functions

 to_bin ($value)
 
 to_hex ($value)
 
 is_hexbin ($value)
 

Detailed Description

Definition at line 22 of file class.ilBMFType_hexBinary.php.

Member Function Documentation

◆ is_hexbin()

ilBMFType_hexBinary::is_hexbin (   $value)

Definition at line 33 of file class.ilBMFType_hexBinary.php.

34 {
35 # first see if there are any invalid chars
36 $l = strlen($value);
37
38 if ($l < 1 || strspn($value, '0123456789ABCDEFabcdef') != $l) return FALSE;
39
40 $bin = ilBMFType_hexBinary::to_bin($value);
41 $hex = ilBMFType_hexBinary::to_hex($bin);
42 return strcasecmp($value, $hex) == 0;
43 }
global $l
Definition: afr.php:30

References $l, to_bin(), and to_hex().

Referenced by ilBMFBase\_getType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ to_bin()

ilBMFType_hexBinary::to_bin (   $value)

Definition at line 24 of file class.ilBMFType_hexBinary.php.

25 {
26 $len = strlen($value);
27 return pack('H' . $len, $value);
28 }

Referenced by is_hexbin().

+ Here is the caller graph for this function:

◆ to_hex()

ilBMFType_hexBinary::to_hex (   $value)

Definition at line 29 of file class.ilBMFType_hexBinary.php.

30 {
31 return bin2hex($value);
32 }

Referenced by is_hexbin().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: