Example #1
0
        public void Utf8Encode()
        {
            var userName = "******";
            var password = "******";

            var headerValue = BasicAuthUtil.EncodeToHeader(userName, password);

            DecodeTest(headerValue, userName, password);

            headerValue = BasicAuthUtil.EncodeToHeader(userName, password, Encoding.UTF8);
            DecodeTest(headerValue, userName, password);
        }
Example #2
0
        public void AsciiEncode()
        {
            var userName = "******";
            var password = "******";

            var headerValue = BasicAuthUtil.EncodeToHeader(userName, password);

            DecodeTest(headerValue, userName, password);

            headerValue = BasicAuthUtil.EncodeToHeader(userName, password, Encoding.UTF8);
            DecodeTest(headerValue, userName, password);
        }