public static IxxXHash Create(xxHashTypes type, xxHashConfig config) { config.CheckNull(nameof(config)); config = config.Clone(); config.HashSizeInBits = (int)type; return(new xxHashFunction(config)); }
public void xxHashConfig_Clone_Works() { var xxHashConfigInstance = new xxHashConfig() { HashSizeInBits = 64, Seed = 1337UL, }; var xxHashConfigClone = xxHashConfigInstance.Clone(); Assert.IsType <xxHashConfig>(xxHashConfigClone); Assert.Equal(xxHashConfigInstance.HashSizeInBits, xxHashConfigClone.HashSizeInBits); Assert.Equal(xxHashConfigInstance.Seed, xxHashConfigClone.Seed); }