using System.Runtime.ConstrainedExecution;
using System.Security.Cryptography;
using System.Security.Permissions;
+using System.Runtime.ExceptionServices;
namespace System.Security {
[MonoTODO ("work in progress - encryption is missing")]
- public sealed class SecureString : CriticalFinalizerObject, IDisposable {
+ public sealed class SecureString : IDisposable {
private const int BlockSize = 16;
private const int MaxSize = 65536;
}
}
+ [HandleProcessCorruptedStateExceptions]
public void AppendChar (char c)
{
if (disposed)
length = 0;
}
+ [HandleProcessCorruptedStateExceptions]
public void InsertAt (int index, char c)
{
if (disposed)
read_only = true;
}
+ [HandleProcessCorruptedStateExceptions]
public void RemoveAt (int index)
{
if (disposed)
try {
Decrypt ();
- Buffer.BlockCopy (data, index + 1, data, index, data.Length - index - 1);
+ Buffer.BlockCopy (data, index * 2 + 2, data, index * 2, data.Length - index * 2 - 2);
Alloc (--length, true);
}
finally {
}
}
+ [HandleProcessCorruptedStateExceptions]
public void SetAt (int index, char c)
{
if (disposed)