Question:You are developing a method to hash data for later verification by using the MD5 algorithm. The data is passed to your method as a byte array named message. You need to compute the hash of the incoming parameter by using MD5. You also need to place the result into a byte array. Which code segment should you use? 

A HashAlgorithm algo = HashAlgorithm.Create("MD5");
byte[] hash = null;
algo.TransformBlock(message, 0, message.Length, hash, 0); 

B HashAlgorithm algo;
algo = HashAlgorithm.Create(message.ToString());
byte[] hash = algo.Hash; 

C HashAlgorithm algo = HashAlgorithm.Create("MD5");
byte[] hash = algo.ComputeHash(message); 

D HashAlgorithm algo = HashAlgorithm.Create("MD5");
byte[] hash = BitConverter.GetBytes(algo.GetHashCode()); 

+ Answer
+ Report
Total Preview: 766

Copyright © 2024. Powered by Intellect Software Ltd