Beispiel #1
0
 public OemString(SafeOemStringPointer oemStringPtr)
 {
     this.Buffer = oemStringPtr;
     if (oemStringPtr == null)
     {
         this.Length        = 0;
         this.MaximumLength = 0;
     }
     else if (oemStringPtr.Length >= ushort.MaxValue)
     {
         throw new ArgumentOutOfRangeException("oemStringPtr");
     }
     else
     {
         // Length of the oem string.
         this.Length        = (ushort)oemStringPtr.Length;
         this.MaximumLength = (ushort)oemStringPtr.Length;
     }
 }
Beispiel #2
0
 public OemString(SafeOemStringPointer oemStringPtr)
 {
     this.Buffer = oemStringPtr;
     if (oemStringPtr == null)
     {
         this.Length = 0;
         this.MaximumLength = 0;
     }
     else if (oemStringPtr.Length >= ushort.MaxValue)
     {
         throw new ArgumentOutOfRangeException("oemStringPtr");
     }
     else
     {
         // Length of the oem string.
         this.Length = (ushort)oemStringPtr.Length;
         this.MaximumLength = (ushort)oemStringPtr.Length;
     }
 }
Beispiel #3
0
 internal static NtStatus RtlCalculateLmOwfPassword(SafeOemStringPointer password, out byte[] hash)
 {
     // Allocate output buffer
     hash = new byte[LMHashNumBytes];
     return(RtlCalculateLmOwfPassword(password, hash));
 }
Beispiel #4
0
 private static extern NtStatus RtlCalculateLmOwfPassword(SafeOemStringPointer password, [MarshalAs(UnmanagedType.LPArray, SizeConst = LMHashNumBytes), In, Out] byte[] hash);
Beispiel #5
0
 internal static NtStatus RtlCalculateLmOwfPassword(SafeOemStringPointer password, out byte[] hash)
 {
     // Allocate output buffer
     hash = new byte[LMHashNumBytes];
     return RtlCalculateLmOwfPassword(password, hash);
 }
Beispiel #6
0
 private static extern NtStatus RtlCalculateLmOwfPassword(SafeOemStringPointer password, [MarshalAs(UnmanagedType.LPArray, SizeConst = LMHashNumBytes), In, Out] byte[] hash);