Sub ArrayXor (b1() As Byte, b2() As Byte) As Byte()
'assuming that the arrays are with the same length
Dim b3(b1.Length) As Byte
For i = 0 To b1.Length - 1
b3(i) = Bit.Xor(b1(i), b2(i))
Next
Return b3
End Sub
Sub ArrayXor (b1() As Byte, b2() As Byte) As Byte()
'assuming that the arrays are with the same length
Dim b3(b1.Length) As Byte
For i = 0 To b1.Length - 1
b3(i) = Bit.Xor(b1(i), b2(i))
Next
Return b3
End Sub
Thank you very much for your answer. I had something like this already implemented, but my concern is about the performance, if I have to use this type of code instead a real function/library using big arrays, like 500k, 50mb, etc... These arrays are entires files that must be encrypted... I have a similar code in python for reference and this runs really fast using the function numpy.bitwise_xor . I will try and I let you know with the result.
Sub ArrayXor_teste As Byte()
'assuming that the arrays are with the same length
Dim b1(552643), b2(552643) As Byte
Dim b3(b1.Length) As Byte
For i = 0 To b1.Length - 1
b3(i) = Bit.Xor(b1(i), b2(i))
Next
Return b3
End Sub
In my test I used a Sansung S8 device and takes 32 seg, why??