Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
21 | final class ObjectIdEncrypter |
||
22 | { |
||
23 | /** |
||
24 | * Holds the metadata separator. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | private static $separator = '::'; |
||
29 | |||
30 | /** |
||
31 | * Encrypt the given searchable. |
||
32 | * |
||
33 | * @param mixed $searchable |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 12 | public static function encrypt($searchable, int $part = null): string |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param string $objectId |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | 2 | public static function decryptSearchable(string $objectId): string |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * @param string $objectId |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | 2 | public static function decryptSearchableKey(string $objectId): string |
|
70 |