Files
NSspi/SecureBuffer/SecureBuffer.cs
2014-06-23 21:50:21 +00:00

37 lines
816 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace NSspi.Contexts
{
[StructLayout( LayoutKind.Sequential )]
public struct SecureBufferInternal
{
public int Count;
public BufferType Type;
// 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; }
}
}