public static void SHA256Transform(byte[] pstate, byte[] pinput, byte[] pinit)
 {
     Sha256Computer ctx = new Sha256Computer();
     Buffer.BlockCopy(pinit, 0, ctx._state, 0, 32);
     ctx.Process(pinput, 0, 64);
     Buffer.BlockCopy(ctx._state, 0, pstate, 0, 32);
 }
 public static UInt256 ComputeSha256Hash(byte[] vch, int offset, int count)
 {
     var sha256Computer = new Sha256Computer();
     UInt256 result = new UInt256();
     var data = result.bytes;
     sha256Computer.Compute(vch, offset, (uint)count, data);
     sha256Computer.Compute(data, data);
     return result;
 }