public static string DecryptAes(string encrypted, byte[] aesKey)
        {
            var decoded = Convert.FromBase64String(encrypted);

            var iv = new byte[IVLength];
            Buffer.BlockCopy(decoded, 0, iv, 0, iv.Length);

            var encryptedData = new byte[decoded.Length - iv.Length];
            Buffer.BlockCopy(decoded, iv.Length, encryptedData, 0, encryptedData.Length);

            var decryptor = new AesManaged {KeySize = 256, BlockSize = 128}.CreateDecryptor(aesKey, iv);

            var decryptedBytes = decryptor.TransformFinalBlock(encryptedData, 0, encryptedData.Length);
            return new UTF8Encoding().GetString(decryptedBytes, 0, decryptedBytes.Length);
        }