Mono.Security.Protocol.Ntlm.ChallengeResponse.PasswordToKey C# (CSharp) Method

PasswordToKey() private method

private PasswordToKey ( string password, int position ) : byte[]
password string
position int
return byte[]
		private byte[] PasswordToKey (string password, int position) 
		{
			byte[] key7 = new byte [7];
			int len = System.Math.Min (password.Length - position, 7);
			Encoding.ASCII.GetBytes (password.ToUpper (CultureInfo.CurrentCulture), position, len, key7, 0);
			byte[] key8 = PrepareDESKey (key7, 0);
			// cleanup intermediate key material
			Array.Clear (key7, 0, key7.Length);
			return key8;
		}
	}