internal byte[] GetDigestedBytes(HashAlgorithm hash) { var bytes = new List <byte>(); _c14nDoc.WriteHash(hash, _ancMgr, bytes); byte[] dados = bytes.ToArray(); return(hash.ComputeHash(dados, 0, dados.Length)); }
internal byte[] GetDigestedBytes(HashAlgorithm hash) { _c14nDoc.WriteHash(hash, DocPosition.BeforeRootElement, _ancMgr); hash.TransformFinalBlock(Array.Empty <byte>(), 0, 0); byte[] res = (byte[])hash.Hash.Clone(); // reinitialize the hash so it is still usable after the call hash.Initialize(); return(res); }