Exception in BouncyCastle
===

I am new in windows phone development. I want to do AES/ECB/PKCS7Padding algorithm in windows phone. But by googling, some said it can only achieve by using BouncyCastle encryption. 
I am trying to do encryption and decryption by using BouncyCastle encryption now. I referenced their dll in to my project. But I am getting a "Null reference exception". 

I am posting my code below. Please help. Its urgent.

    public MainPage()
        {
            InitializeComponent();

            encrypt("string for encryption", "qwertyuioplkjhgf");

        }

        public static string encrypt(string input, string password)
        {
            #region encrypt

            var byteArray = Encoding.UTF8.GetBytes(input);
            var key = Encoding.UTF8.GetBytes(password);
            var encryptioncipher = CipherUtilities.GetCipher("AES/ECB/PKCS7");
            encryptioncipher.Init(true, new KeyParameter(key));

            //string algo = encryptioncipher.AlgorithmName;
            int blocksize = encryptioncipher.GetBlockSize();

            byte[] bytes = encryptioncipher.ProcessBytes(byteArray);

            byte[] final = encryptioncipher.DoFinal();

            string resultBytes = Encoding.UTF8.GetString(bytes, 0, bytes.Length); // Here getting the NullReferenceException. bytes is getting null here

            MemoryStream encryptedstream = new MemoryStream(bytes.Length + final.Length);
            encryptedstream.Write(bytes, 0, bytes.Length);
            encryptedstream.Write(final, 0, final.Length);
            encryptedstream.Flush();

            byte[] encryptedData = new byte[encryptedstream.Length];
            encryptedstream.Position = 0;
            encryptedstream.Read(encryptedData, 0, encryptedData.Length);

            //Convert to hex string
            string result = Convert.ToBase64String(encryptedData);// HexHelper.GetHextString(encryptedData);
            return result;

            #endregion

        }