Ejemplo 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);
 }
Ejemplo 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);
        }
Ejemplo 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;
		}