← All tasks
🧮
Intermediate

Write a Cryptographically Secure Random Token

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the PHP expression to generate a 32-byte cryptographically secure random token as a hex string.

Scenario

A password reset feature needs an unguessable token, not one based on rand() or time().

Ready to try it?

Create a free account and subscribe to take "Write a Cryptographically Secure Random Token". Earn 90 XP and track your internship progress.

Already have an account? Sign in