GIAC GIAC Secure Software Programmer - C#.NET GSSP-.NET Question # 114 Topic 12 Discussion

GIAC GIAC Secure Software Programmer - C#.NET GSSP-.NET Question # 114 Topic 12 Discussion

GSSP-.NET Exam Topic 12 Question 114 Discussion:
Question #: 114
Topic #: 12

You work as a Software Developer for ABC Inc. You create a Console application named

ConsoleApplication4. You use the System.Security.Cryptography namespace. You want to use the key lengths of 384 bits to 16384 bits. You use RSACryptoServiceProvider class to encrypt and decrypt data. Which of the following code segments will you use to accomplish this task?

Each correct answer represents a part of the solution. Choose all that apply.


A.

UnicodeEncoding ByteConverter = new UnicodeEncoding();

byte[] DataToEncrypt = ByteConverter.GetBytes("Encrypt this line for testing");

byte[] encryptData;

byte[] decryptData;

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();

encryptData = RSA.Encrypt(DataToEncrypt, true);

Console.WriteLine("Encrypted : {0}", ByteConverter.GetString(encryptData));

decryptData = RSA.Decrypt(encrypt


B.

UnicodeEncoding ByteConverter = new UnicodeEncoding();

byte[] DataToEncrypt = ByteConverter.GetBytes("Encrypt this line for testing");

byte[] encryptData;

byte[] decryptData;

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();

encryptData = RSA.Encrypt(DataToEncrypt, false);

Console.WriteLine("Encrypted : {0}", ByteConverter.GetString(encryptData));

decryptData = RSA.Decrypt(encryp


C.

UnicodeEncoding ByteConverter = new UnicodeEncoding();

byte[] DataToEncrypt = ByteConverter.GetBytes("Encrypt this line for testing");

byte[] encryptData;

byte[] decryptData;

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();

encryptData = RSA.Encrypt(DataToEncrypt, false);

Console.WriteLine("Encrypted : {0}", ByteConverter.GetString(encryptData));

decryptData = RSA.Decrypt(encryp


D.

UnicodeEncoding ByteConverter = new UnicodeEncoding();

byte[] DataToEncrypt = ByteConverter.GetBytes("Encrypt this line for testing");

byte[] encryptData;

byte[] decryptData;

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();

encryptData = RSA.Encrypt(DataToEncrypt, true);

Console.WriteLine("Encrypted : {0}", ByteConverter.GetString(encryptData));

decryptData = RSA.Decrypt(encrypt


Get Premium GSSP-.NET Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.