March 2019
Intermediate to advanced
336 pages
9h 9m
English
The xor method takes the byteStr1 and byteStr2 byte arrays as parameters and returns the XOR-transformation result, as follows:
// XOR methodfunc xor(byteStr1 []byte, byteStr2 []byte) []byte { var xorbytes []byte xorbytes = make([]byte, len(byteStr1)) var i int for i = 0; i < len(byteStr1); i++ { xorbytes[i] = byteStr1[i] ^ byteStr2[i] } return xorbytes}
Read now
Unlock full access