// This Calculates the transaction hash (which will be used as its Id) private string CalculateHash() { sequence++; return(StringUtil.ApplySha256( Sender.GetStringFromKey() + Recipient.GetStringFromKey() + Value.ToString() + sequence.ToString() )); }
public static string CalculateHash(Block block, int nonce) { var calculatedhash = StringUtil.ApplySha256( block.PreviousHash + block.Timestamp + nonce + block.ReceiptPositions ); return(calculatedhash); }
public string CalculateHash() => StringUtil.ApplySha256(PreviousHash + timeStamp.ToString() + Nonce.ToString() + Data);