using System;
using System.Collections.Generic;
+using System.Linq;
using System.Text;
namespace Novacoin
trimStart--;
}
- byte[] result = new byte[trimStart + 1];
- Array.Copy(bytes, 0, result, 0, trimStart + 1);
+ return bytes.Take(trimStart + 1).ToArray();
+ }
+
+ public static byte[] AppendWithZeros(byte[] bytes, int nTargetLen=32)
+ {
+ var result = new byte[nTargetLen];
+ bytes.CopyTo(result, 0);
return result;
}