Example #1
0
        public override void InitKey(string key)
        {
            BeanUtil.Clear(_Do.CbType);

            switch (key)
            {
                case ESec.DIR_ENCRYPT:
                    if (_Enc == null)
                    {
                        _Enc = new SstreamEnc(_APro, _Do);
                    }
                    _Cur = _Enc;
                    break;
                case ESec.DIR_DECRYPT:
                    if (_Dec == null)
                    {
                        _Dec = new SstreamDec(_APro, _Do);
                    }
                    _Cur = _Dec;
                    break;
                default:
                    if (_Def == null)
                    {
                        _Def = new SstreamDef(_APro, _Do);
                    }
                    _Cur = _Def;
                    break;
            }

            _Cur.InitKey(key);
        }
Example #2
0
File: Do.cs Project: burstas/rmps
        public void Init()
        {
            _Default = new Default(_APro, this);
            _Digest = new Digest(_APro, this);
            _RandKey = new RandKey(_APro, this);
            _Wrapper = new Wrapper(_APro, this);
            _Confuse = new Confuse(_APro, this);
            _Scrypto = new Scrypto(_APro, this);
            _Sstream = new Sstream(_APro, this);
            _Acrypto = new Acrypto(_APro, this);
            _Txt2Img = new Txt2Img(_APro, this);

            _Ado = _Default;

            CbMask.Items.Add(ADo._MaskDef);
            CbMask.SelectedIndex = 0;

            CbType.Items.Add(ADo._TypeDef);
            CbType.SelectedIndex = 0;
        }