Fix caching of secrets that contain extended ascii or double byte keys and values.

This commit is contained in:
Jim Norman 2005-11-01 17:02:52 +00:00
parent 54fb8faee1
commit 408a1f2f50

View File

@ -132,15 +132,11 @@ namespace sscs.lss
byte[] decryptedBuffer = CASACrypto.ReadFileAndDecryptData(key,fileName);
if( null == decryptedBuffer )
return null;
char[] chArr = new char[decryptedBuffer.Length];
for(int z = 0; z < decryptedBuffer.Length; z++ )
{
chArr[z] = (char)decryptedBuffer[z];
}
string toReturn = new string(chArr);
return toReturn;
return null;
string temp = Encoding.UTF8.GetString(decryptedBuffer, 0, decryptedBuffer.Length);
return temp;
}
catch(Exception e)
{