예제 #1
0
        public Blake2BFunction(BlakeConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            _config = config.Clone();
        }
예제 #2
0
 public Blake2bCryptoServiceProvider(BlakeConfig config)
 {
     if (config is null || config.Key is null)
     {
         _digest = new Blake2bDigest();
     }
예제 #3
0
 public BlockTransformer(BlakeConfig config)
 {
     _hashSizeInBits = config.HashSizeInBits;
     _config         = config;
 }
예제 #4
0
 public static IBlake Create(BlakeTypes type, BlakeConfig config) => Factory.Create(type, config);
예제 #5
0
 public static IBlake Create(BlakeConfig config) => new Blake2BFunction(config);
예제 #6
0
 public static IBlake Create(BlakeConfig config) => new Blake1Function(config, BlakeTypes.Blake512);
 public BlockTransformer(BlakeConfig config, BlakeTypes type)
 {
     _type                     = type;
     _hashSizeInBits           = config.HashSizeInBits;
     _internalAlgorithmFactory = GetHashAlgorithm(_type);
 }
 public Blake1Function(BlakeConfig config, BlakeTypes type)
 {
     HashType = type;
     _config  = config;
 }