0
Answer

Encryptor's security

mmplay

mmplay

20y
1.8k
1
Hi, there *************************************************************** RijndaelManaged RMCrypto = new RijndaelManaged(); byte[] Key = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16}; byte[] IV = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16}; CryptoStream CryptStream = new CryptoStream(NetStream, RMCrypto.CreateEncryptor(Key, IV), CryptoStreamMode.Write); StreamWriter SWriter = new StreamWriter(CryptStream); SWriter.WriteLine("Hello World!"); *************************************************************** Compile and run it, I think it's possible that the Key[] value would be stealed. How to protect the Key[]? Thanks...