Created
October 4, 2012 18:34
-
-
Save benjamingeiger/3835506 to your computer and use it in GitHub Desktop.
XOR method with type error.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static byte[] xor(byte[] left, byte[] right, int len) | |
{ | |
byte[] output = new byte[len]; | |
for (int i = 0; i < len; i++) { | |
output[i] = (byte) ((byte) left[i]) ^ ((byte) right[i]); | |
} | |
return output; | |
} | |
/* | |
GroundRound.java:41: possible loss of precision | |
found : int | |
required: byte | |
output[i] = (byte) ((byte) left[i]) ^ ((byte) right[i]); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment