public MetroHash064Function(MetroHashConfig config) { if (config is null) { throw new ArgumentNullException(nameof(config)); } _config = config.Clone(); }
public static IMetroHash Create(MetroHashTypes type, MetroHashConfig config) { if (config is null) { throw new ArgumentNullException(nameof(config)); } return(type switch { MetroHashTypes.MetroHashBit64 => new MetroHash064Function(config), MetroHashTypes.MetroHashBit128 => new MetroHash128Function(config), _ => throw new ArgumentOutOfRangeException(nameof(type), type, null) });
public static IMetroHash Create(MetroHashTypes type, MetroHashConfig config) => Factory.Create(type, config);