encode and decode works on 16 byte chunks