public static HashCode512 ToHashCode512(this IHashValue hashVal, bool strictMode = true)
        {
            if (hashVal is null)
            {
                return(HashCode512.Zero);
            }
            var hex = hashVal.GetHexString();

            return(strictMode ? HashCode512.Parse(hex) : HashCode512.ParseLoosely(hex));
        }
        public static HashCode512 SafeHashCode512(this IHashValue hashVal, bool strictMode = true)
        {
            if (hashVal is null)
            {
                return(HashCode512.Zero);
            }

            var hex = hashVal.GetHexString();

            return(strictMode
                ? HashCode512.TryParse(hex, out var hash)
                    ? hash
                    : HashCode512.Zero
                : HashCode512.TryParseLoosely(hex, out hash)
                    ? hash
                    : HashCode512.Zero);
        }