예제 #1
0
        public void ToByteStringTest()
        {
            var baseNString = "6Q======";
            var expected    = new byte[] { 244 };

            var actual = Base32Convert.ToBytes(baseNString);

            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void ToBytesByteArrayPartialTest()
        {
            var baseNCharBytes = "996Q======99".ToCharArray().Select(ch => (byte)ch).ToArray();
            var expected       = new byte[] { 244 };

            var actual = Base32Convert.ToBytes(baseNCharBytes, 2, baseNCharBytes.Length - 4);

            Assert.Equal(expected, actual);
        }
예제 #3
0
        public void ToBytesByteArrayTest()
        {
            var baseNCharBytes = "6Q======".ToCharArray().Select(ch => (byte)ch).ToArray();
            var expected       = new byte[] { 244 };

            var actual = Base32Convert.ToBytes(baseNCharBytes);

            Assert.Equal(expected, actual);
        }
예제 #4
0
        public void ToBytesCharArrayPartialTest()
        {
            var baseNChars = "996Q======99".ToCharArray();
            var expected   = new byte[] { 244 };

            var actual = Base32Convert.ToBytes(baseNChars, 2, baseNChars.Length - 4);

            Assert.Equal(expected, actual);
        }
예제 #5
0
        public void ToBytesCharArrayTest()
        {
            var baseNChars = "6Q======".ToCharArray();
            var expected   = new byte[] { 244 };

            var actual = Base32Convert.ToBytes(baseNChars);

            Assert.Equal(expected, actual);
        }
예제 #6
0
        public void ToBytesStringPartialTest()
        {
            var baseNString = "996Q======99";
            var expected    = new byte[] { 244 };

            var actual = Base32Convert.ToBytes(baseNString, 2, baseNString.Length - 4);

            Assert.Equal(expected, actual);
        }