Пример #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;
     }
 }
Пример #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;
     }
 }
Пример #3
0
 internal static NtStatus RtlCalculateLmOwfPassword(SafeOemStringPointer password, out byte[] hash)
 {
     // Allocate output buffer
     hash = new byte[LMHashNumBytes];
     return(RtlCalculateLmOwfPassword(password, hash));
 }
Пример #4
0
 private static extern NtStatus RtlCalculateLmOwfPassword(SafeOemStringPointer password, [MarshalAs(UnmanagedType.LPArray, SizeConst = LMHashNumBytes), In, Out] byte[] hash);
Пример #5
0
 internal static NtStatus RtlCalculateLmOwfPassword(SafeOemStringPointer password, out byte[] hash)
 {
     // Allocate output buffer
     hash = new byte[LMHashNumBytes];
     return RtlCalculateLmOwfPassword(password, hash);
 }
Пример #6
0
 private static extern NtStatus RtlCalculateLmOwfPassword(SafeOemStringPointer password, [MarshalAs(UnmanagedType.LPArray, SizeConst = LMHashNumBytes), In, Out] byte[] hash);