Ejemplo n.º 1
0
            public Md6Worker(MdConfig config)
            {
                config.CheckParams();

                _d = (uint)config.HashSizeInBits;
                _L = config.ModeControl;
                _r = config.NumberOfRound;

                _key   = config.Key;
                _isHex = config.IsHexString;
            }
Ejemplo n.º 2
0
            public MdBlockTransformer(MdConfig config)
            {
                _hashSizeInBits = config.HashSizeInBits;
                _mdType         = config.Type;

                _worker = config.Type switch
                {
                    MdTypes.Md2 => _worker       = new Md2Worker(),
                    MdTypes.Md4 => _worker       = new Md4Worker(),
                    MdTypes.Md5 => _worker       = new Md5Worker(_mdType),
                    MdTypes.Md5Bit16 => _worker  = new Md5Worker(_mdType),
                    MdTypes.Md5Bit32 => _worker  = new Md5Worker(_mdType),
                    MdTypes.Md5Bit64 => _worker  = new Md5Worker(_mdType),
                    MdTypes.Md6 => _worker       = new Md6Worker(config),
                    MdTypes.Md6Bit128 => _worker = new Md6Worker(config),
                    MdTypes.Md6Bit256 => _worker = new Md6Worker(config),
                    MdTypes.Md6Bit512 => _worker = new Md6Worker(config),
                    MdTypes.Md6Custom => _worker = new Md6Worker(config),
                    _ => null
                };

                _trimOptions = config.GetTrimOptions();
            }
Ejemplo n.º 3
0
 internal MdFunction(Md6Options options)
 {
     HashType  = MdTypes.Md6Custom;
     _mdConfig = options;
 }
Ejemplo n.º 4
0
 internal MdFunction(MdTypes type)
 {
     HashType  = type;
     _mdConfig = MdTable.Map(type);
 }