Developing Applications Using Cisco Core Platforms and APIs (DEVCOR) — Question 172

There is a requirement to securely store unique usernames and passwords. Given a valid username, it is also required to validate that the password provided is correct.
Which action accomplishes this task?

Answer options

Correct answer: A

Explanation

Option A is correct because encrypting the username allows for its retrieval while hashing the password ensures that it cannot be reversed, providing security. Option B is incorrect as hashing the username does not allow for retrieval. Option C is not ideal because encrypting the password does not provide the benefits of hashing, which is crucial for secure password storage. Option D incorrectly hashes the username and only encrypts the password, which does not meet the requirement of securely storing the username.