static bool hexEqual(String a, String b) { if (!isHexBytes(a) || !isHexBytes(b)) { throw ArgumentException("Invalid hex string."); } return strip0x(a.toLowerCase()) == strip0x(b.toLowerCase()); }