nerdexam
GIAC

GSSP-NET · Question #322

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a method to hash data with the Secure Hash Algorithm (SHA) using…

The correct answer is D. SHA1 Mysha1 = new SHA1CryptoServiceProvider(). See the full explanation below for the reasoning.

Question

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a method to hash data with the Secure Hash Algorithm (SHA) using .NET Framework. The hash data is passed to the method as a byte array named msg. You are required to calculate the hash of the msg array by using the SHA1. It is also mandatory to place the result into a byte array named Myhash. Which of the following code segments should you use to accomplish the task?

Options

  • ASHA1 Mysha1 = new SHA1CryptoServiceProvider();
  • BSHA1 Mysha1 = new SHA1CryptoServiceProvider();
  • CSHA1 Mysha1 = new SHA1CryptoServiceProvider();
  • DSHA1 Mysha1 = new SHA1CryptoServiceProvider();

How the community answered

(36 responses)
  • A
    8% (3)
  • B
    3% (1)
  • C
    6% (2)
  • D
    83% (30)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice