public override void InitKey(string key) { _Key = key; BeanUtil.Clear(_Di.CbType); switch (_Key) { case ESec.DIR_ENCRYPT: if (_Enc == null) { _Enc = new SstreamEnc(_APro, _Di); } _Cur = _Enc; break; case ESec.DIR_DECRYPT: if (_Dec == null) { _Dec = new SstreamDec(_APro, _Di); } _Cur = _Dec; break; default: if (_Def == null) { _Def = new SstreamDef(_APro, _Di); } _Cur = _Def; break; } _Cur.InitKey(key); }
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); _Adi = _Default; CbMask.Items.Add(ADi._MaskDef); CbMask.SelectedIndex = 0; CbType.Items.Add(ADi._TypeDef); CbType.SelectedIndex = 0; }