Total Complexity | 2 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | trait TpmStructureTrait |
||
8 | { |
||
9 | private static function readLengthPrefixed(ByteBuffer $buffer, int &$offset): ByteBuffer |
||
10 | { |
||
11 | $len = $buffer->getUint16Val($offset); |
||
12 | $data = $buffer->getBytes($offset + 2, $len); |
||
13 | $offset += (2 + $len); |
||
14 | return new ByteBuffer($data); |
||
15 | } |
||
16 | |||
17 | private static function readFixed(ByteBuffer $buffer, int &$offset, int $length): ByteBuffer |
||
22 | } |
||
23 | } |
||
24 |