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);
|
byte[] decryptedBuffer = CASACrypto.ReadFileAndDecryptData(key,fileName);
|
||||||
|
|
||||||
if( null == decryptedBuffer )
|
if( null == decryptedBuffer )
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
char[] chArr = new char[decryptedBuffer.Length];
|
string temp = Encoding.UTF8.GetString(decryptedBuffer, 0, decryptedBuffer.Length);
|
||||||
for(int z = 0; z < decryptedBuffer.Length; z++ )
|
|
||||||
{
|
return temp;
|
||||||
chArr[z] = (char)decryptedBuffer[z];
|
|
||||||
}
|
|
||||||
string toReturn = new string(chArr);
|
|
||||||
return toReturn;
|
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user