Esempio n. 1
0
 public bool Parse(string challenge)
 {
     parser = new DigestHeaderParser(challenge);
     if (!parser.Parse())
     {
         return(false);
     }
     if (parser.Algorithm == null || parser.Algorithm.ToUpper().StartsWith("MD5"))
     {
         hash = HashAlgorithm.Create("MD5");
     }
     return(true);
 }
Esempio n. 2
0
        public bool Parse(string challenge)
        {
            parser = new DigestHeaderParser(challenge);
            if (!parser.Parse())
            {
                return(false);
            }

            // build the hash object (only MD5 is defined in RFC2617)
            if ((parser.Algorithm == null) || (parser.Algorithm.ToUpper().StartsWith("MD5")))
            {
                hash = MD5.Create();
            }

            return(true);
        }
Esempio n. 3
0
		public bool Parse (string challenge) 
		{
			parser = new DigestHeaderParser (challenge);
			if (!parser.Parse ()) {
				return false;
			}

			// build the hash object (only MD5 is defined in RFC2617)
			if ((parser.Algorithm == null) || (parser.Algorithm.ToUpper ().StartsWith ("MD5")))
				hash = MD5.Create ();

			return true;
		}