Class BinaryExtensions
Provides extension methods for binary operations.
public static class BinaryExtensions
- Inheritance
-
BinaryExtensions
- Inherited Members
Methods
ExclusiveOr(byte[], byte[])
Performs a bitwise exclusive OR (XOR) operation on two byte arrays of the same length.
public static byte[] ExclusiveOr(this byte[] originalBytes, byte[] compareBytes)
Parameters
originalBytesbyte[]The first byte array to be XORed.
compareBytesbyte[]The second byte array to be XORed. Must be the same length as the first byte array.
Returns
- byte[]
A byte array containing the result of the XOR operation.
Exceptions
- ArgumentException
Thrown when the lengths of the two byte arrays do not match.