Decode handles tokens. Encode checks token length.