Activity 17 - March 23, 2026
Submitted by Calina Winfield
Encryption Activity
- Plain Password
- md5() function
- Adding salt to md5
- General Approach: password_has() function
The original pw string is: 1234.
The encrypted string with md5() function is: 81dc9bdb52d04dc20036dbd8313ed055.
The encrypted string with md5 and a random salt is: ba440dd808e62d9576e864f69e2a628e.
The encrypted string using password_hash function is: $2y$12$6nk1C/ukuPxY20KLkpjW..s9hRwZs7WDvb1J6azmCTvDnSU4zWIFq.
Password verified successfully!
The encrypted string is very long. Make sure you update/check your database pw column. It should have enough space to store the encrypted password. Suggest length: 255. Update both localhost and GGC Domain databases.