byte[] defArr = File.ReadAllBytes(filePath);

byte[] md5Arr = GetMd5Hash(filePath);
            
int len = defArr.Length + md5Arr.Length;
byte[] lenArr = BitConverter.GetBytes(len);
if (BitConverter.IsLittleEndian)
   Array.Reverse(lenArr);

//resArr为合并后数组
byte[] resArr = new byte[lenArr.Length + defArr.Length + md5Arr.Length];
lenArr.CopyTo(resArr, 0);
md5Arr.CopyTo(resArr, lenArr.Length);
defArr.CopyTo(resArr, lenArr.Length + md5Arr.Length);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-09-02
  • 2022-12-23
相关资源
相似解决方案