1 | <?php |
||
50 | class XorMixer extends \RandomLib\AbstractMixer |
||
51 | { |
||
52 | |||
53 | /** |
||
54 | * Return an instance of Strength indicating the strength of the source |
||
55 | * |
||
56 | * @return \SecurityLib\Strength An instance of one of the strength classes |
||
57 | */ |
||
58 | public static function getStrength() |
||
62 | |||
63 | /** |
||
64 | * Test to see if the mixer is available |
||
65 | * |
||
66 | * @return bool If the mixer is available on the system |
||
67 | */ |
||
68 | public static function test() |
||
72 | |||
73 | /** |
||
74 | * Get the block size (the size of the individual blocks used for the mixing) |
||
75 | * |
||
76 | * @return int The block size |
||
77 | */ |
||
78 | protected function getPartSize() |
||
82 | |||
83 | /** |
||
84 | * Mix 2 parts together using one method |
||
85 | * |
||
86 | * @param string $part1 The first part to mix |
||
87 | * @param string $part2 The second part to mix |
||
88 | * |
||
89 | * @return string The mixed data |
||
90 | */ |
||
91 | protected function mixParts1($part1, $part2) |
||
95 | |||
96 | /** |
||
97 | * Mix 2 parts together using another different method |
||
98 | * |
||
99 | * @param string $part1 The first part to mix |
||
100 | * @param string $part2 The second part to mix |
||
101 | * |
||
102 | * @return string The mixed data |
||
103 | */ |
||
104 | protected function mixParts2($part1, $part2) |
||
109 | } |
||
110 |