# Does C# Triple DES Encryption need 128 bit key or 192 bit key [closed]

I have the following code in C#

using System.Web.Security;

TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
tdes.Key = keyArray;
ICryptoTransform cTransform = tdes.CreateEncryptor();
byte[] resultArray =
cTransform.TransformFinalBlock(plainTextArray, 0,
toEncryptArray.Length);


Does the code use the Key1 Key2 Key1 method of encryption or the Key1 Key2 Key3 method of encryption? I have heard that depending on the method it uses I will either need a 128 bit key for the first method or a 192 bit key for the second method.

## closed as off-topic by Ella Rose♦, Squeamish Ossifrage, Gilles, e-sushiJun 8 '18 at 14:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Programming questions are off-topic even if you are writing or debugging cryptographic code. Unless your question is specifically about how the cryptographic algorithm, protocol or side-channel (mitigation) works, you should look into asking on Stack Overflow instead." – Ella Rose, Squeamish Ossifrage, Gilles, e-sushi
If this question can be reworded to fit the rules in the help center, please edit the question.