Courseiva
easyMultiple ChoiceObjective-mapped

CAS-004 Practice Question: A developer needs to securely store user…

A developer needs to securely store user passwords in a database. Which hashing technique is recommended for password storage?

⚠ Common exam trap

CompTIA CASP+ often tests the misconception that adding a salt to a fast hash like SHA-256 makes it suitable for passwords, but the trap is that without a built-in work factor, the hash remains too fast for attackers to brute-force efficiently.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

bcrypt with a per-user salt

Bcrypt is recommended for password storage because it incorporates a per-user salt to prevent rainbow table attacks and uses a configurable cost factor to slow down brute-force attempts, making it resistant to GPU-based cracking. Unlike general-purpose hashes like SHA-256, bcrypt is designed specifically for password hashing with built-in salting and adaptive work factor.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • SHA-256 with a random salt

    Why it's wrong here

    SHA-256 is fast and can be brute-forced if not iterated.

  • bcrypt with a per-user salt

    Why this is correct

    bcrypt is slow and includes salting, resistant to rainbow tables.

  • MD5 with a static salt

    Why it's wrong here

    MD5 is cryptographically broken and fast to compute.

  • Base64 encoding

    Why it's wrong here

    Encoding is reversible, not a hash.

About these practice questions

One of 968 original CAS-005 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.