Convert.ToBase64String为不同的字节数组返回相同的值吗?

时间:2018-11-16 20:10:49

标签: c# arrays base64

此示例:

            var a = Convert.ToBase64String(BitConverter.GetBytes((long)531689).Reverse().ToArray());
            var b = Convert.ToBase64String(BitConverter.GetBytes((long)532105).Reverse().ToArray());
            Console.WriteLine("{0} != {1}", a, b);

输出:

AAAAAAAIHOk= != AAAAAAAIHok=

怎么可能?

1 个答案:

答案 0 :(得分:4)

好吧

AAAAAAAIHOk= is not equal to AAAAAAAIHok=
---------^---                  -------^---