private static byte[] CalculateC14nDigest(XmlDocument doc, HashAlgorithm hash) { return hash.ComputeHash(CalculateC14nByteRange(doc)); }