Fix caching of secrets that contain extended ascii or double byte keys and values.
This commit is contained in:
parent
54fb8faee1
commit
408a1f2f50
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user