Example #1
0
        /// <summary>
        ///     Logical Xor
        /// </summary>
        /// <param name="left">the left side operand</param>
        /// <param name="right">the right side operand</param>
        public static FixedBytes Xor(FixedBytes left,
                                     FixedBytes right)
        {
            if (left == null ||
                right == null)
            {
                return(null);
            }

            return(ByteArrayUtils.BitwiseXorBigEndian(left.UnderlyingBytes, right.GetBytes())
                   .ToFixedBytes());
        }
Example #2
0
 /// <summary>
 ///     Conversion from <see cref="FixedBytes" /> to <see cref="byte" /> array
 /// </summary>
 /// <param name="fixedBytes">input</param>
 public static byte[] FromFixedBytes(FixedBytes fixedBytes)
 {
     return(fixedBytes == null
                ? null
                : fixedBytes.GetBytes());
 }