Changed how internal structures are created for handling SecureBuffers.
This commit is contained in:
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
namespace NSspi.Contexts
|
||||
{
|
||||
[StructLayout( LayoutKind.Sequential )]
|
||||
public unsafe struct SecureBuffer
|
||||
public unsafe struct SecureBufferInternal
|
||||
{
|
||||
public int Count;
|
||||
|
||||
@@ -17,4 +17,20 @@ namespace NSspi.Contexts
|
||||
// A pointer to a byte[]
|
||||
public IntPtr Buffer;
|
||||
}
|
||||
|
||||
public class SecureBuffer
|
||||
{
|
||||
public SecureBuffer( byte[] buffer, BufferType type )
|
||||
{
|
||||
this.Buffer = buffer;
|
||||
this.Type = type;
|
||||
this.Length = this.Buffer.Length;
|
||||
}
|
||||
|
||||
public BufferType Type { get; set; }
|
||||
|
||||
public byte[] Buffer { get; set; }
|
||||
|
||||
public int Length { get; internal set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user