Exam 70-536 : .NET Framework Application Development Foundation Part – 11

Question: You are developing a server application that will transmit sensitive information on a network. You create an X509Certificate object named certificate and a TcpClient object named client. You need to create an SslStream to communicate by using the Transport Layer Security 1.0 protocol. Which code segment should you use?

  1. SslStream ssl = new SslStream(client.GetStream());
    ssl.AuthenticateAsServer(certificate, false, SslProtocols.None, true);
  2. SslStream ssl = new SslStream(client.GetStream());
    ssl.AuthenticateAsServer(certificate, false, SslProtocols.Ssl3, true);
  3. SslStream ssl = new slStream(client.GetStream());
    ssl.AuthenticateAsServer(certificate, false, SslProtocols.Ssl2, true);
  4. SslStream ssl = new SslStream(client.GetStream());
    ssl.AuthenticateAsServer(certificate, false, SslProtocols.Tls, true);

Correct Answer: 4


Question: You are developing a method to encrypt sensitive data with the Data Encryption Standard (DES) algorithm. Your method accepts the following parameters:

  • The byte array to be encrypted, which is named message.
  • An encryption key, which is named key
  • An initialization vector, which is named iv

You need to encrypt the data. You also need to write the encrypted data to a MemoryStream object. Which code segment should you use?

Correct Answer: 4


Question: You are creating a new security policy for an application domain. You write the following lines of code.

You need to arrange code groups for the policy so that loaded assemblies default to the Nothing permission set. If the assembly originates from a trusted zone, the security policy must grant the assembly the FullTrust permission set. Which code segment should you use?

Correct Answer: 2


Question: You are developing a method to decrypt data that was encrypted with the Triple DES Algorithm. The method accepts the following parameters:

  • The byte array to be decrypted, which is named cipherMessage
  • The key, which is named key
  • An initialization vector, which is named iv

You need to decrypt the message by using the TripleDES class and place the result in a string. Which code segment should you use?

Correct Answer: 4


Question: You are writing a method that returns an ArrayList named al. You need to ensure that changes to the ArrayList are performed in a threadsafe manner. Which code segment should you use?

Correct Answer: 4

Tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.