Example #1
0
        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);
 public static IMetroHash Create(MetroHashTypes type = MetroHashTypes.MetroHashBit64) => Factory.Create(type);
Example #4
0
 public static IMetroHash Create(MetroHashTypes type = MetroHashTypes.MetroHashBit64)
 {
     return(Create(type, new MetroHashConfig()));
 }