'SubBytes step, apply S-box to all bytes
Depending on whether encrypting or decrypting, a different sbox array
is passed in.'

def sub_bytes(self, block, sbox):

    for i in xrange(16):
        block[i] = sbox[block[i]]
