EncryptionUtils.php
Table of Contents
Functions
- interleave() : void
- Interleaves a sequence of bytes. When encrypting EO data, bytes are "woven" into each other.
- deinterleave() : void
- Deinterleaves a sequence of bytes. This is the reverse of interleave.
- flipMsb() : void
- Flips the most significant bits of each byte in a sequence of bytes.
- swapMultiples() : void
- Swaps the order of contiguous bytes in a sequence that are divisible by a given multiple value.
Functions
interleave()
Interleaves a sequence of bytes. When encrypting EO data, bytes are "woven" into each other.
interleave(array<string|int, int> &$data) : void
This is an in-place operation.
Parameters
- $data : array<string|int, int>
-
Reference to the data to interleave.
deinterleave()
Deinterleaves a sequence of bytes. This is the reverse of interleave.
deinterleave(array<string|int, int> &$data) : void
This is an in-place operation.
Parameters
- $data : array<string|int, int>
-
Reference to the data to deinterleave.
flipMsb()
Flips the most significant bits of each byte in a sequence of bytes.
flipMsb(array<string|int, int> &$data) : void
Values 0 and 128 are not flipped.
Parameters
- $data : array<string|int, int>
-
Reference to the data to flip MSB on.
swapMultiples()
Swaps the order of contiguous bytes in a sequence that are divisible by a given multiple value.
swapMultiples(array<string|int, int> &$data, int $multiple) : void
Parameters
- $data : array<string|int, int>
-
Reference to the data to swap bytes in.
- $multiple : int
-
The multiple value.