Here is the bit of code I'm working with:
byte[] encodedBytes1 = null;
byte[] encodedBytes2 = null;
try {
Cipher c = Cipher.getInstance(encryptationMode);
c.init(Cipher.ENCRYPT_MODE, key);
encodedBytes1 = c.doFinal(TestText1.getBytes());
encodedBytes2 = c.doFinal(TestText2.getBytes());
} catch (Exception e) {
//Log.e(TAG, "AES encryption error");
}
byte[] encodedHomo = null;
boolean encoded1_2 = TestText1.getBytes() || TestText2.getBytes();
So I'm trying to do bitwise operations on encodedBytes1
and encodedBytes2
and make that new value encodedHomo
(my project is homomorphic encryption on AES algorithm). Why can't I perform bitwise operation operations on type byte[]
? What is, if any, the difference between the type byte
and byte[]
?