Self-encoded tokens