Exemplo n.º 1
0
        public KeyCipher(IPasswordSafeCrypto crypto, bool forEncryption, string passkey, byte[] salt, uint N)
            : base(new TwofishEngine())
        {
            _crypto = crypto;

            _key = _crypto.StretchKey(passkey, salt, N);

            var param = new KeyParameter(_key);

            Init(forEncryption, param);
        }