Returns the binary OR of the 2 provided strings s1 and s2. s1 and s2 must be of same length.
(s1, s2)
| 698 | |
| 699 | |
| 700 | def stror(s1, s2): |
| 701 | # type: (bytes, bytes) -> bytes |
| 702 | """ |
| 703 | Returns the binary OR of the 2 provided strings s1 and s2. s1 and s2 |
| 704 | must be of same length. |
| 705 | """ |
| 706 | return b"".join(map(lambda x, y: struct.pack("!B", x | y), s1, s2)) |
| 707 | |
| 708 | |
| 709 | def strxor(s1, s2): |