how encode a string using base64 and how to convert this encoded string into orginal string?
<p>i am new to iphone</p>

<p>in my app i connect to twitter and send message in encoded form to display on message textfield to post  but that code display in encoded form i want displat that in orginal textformate any help to how to convert it into orginal string formate, my code</p>

<pre><code>NSString *str1 = twittermessage;//twitter message is my orginal string
    NSData *encrypteddata1 = [str1 dataUsingEncoding:NSASCIIStringEncoding];
    NSString *b64EncStr1 = [Base64 encode:encrypteddata1];
    NSLog(@"Encoded:%@",b64EncStr1);
    //NSData *plainTextData = [NSData dataFromBase64String:b64EncStr1];
    //NSString *plainText = [[NSString alloc] initWithData:plainTextData
    //                                          encoding:NSUTF8StringEncoding];
    //NSLog(@"Decode:%@",plainText);

        //NSString *urlAddress = @"http://twitter.com/?status=%@",;
    //NSString *urlAddress = [NSString 
                                  // stringWithFormat:@"http://mobile.twitter.com/?status=%@", 
                                  // twittermessage];
    NSString *urlAddress = [NSString 
                            stringWithFormat:@"http://mobile.twitter.com/?status=%@",b64EncStr1];

        //Create a URL object.
        NSURL *url = [NSURL URLWithString:urlAddress];

        //URL Requst Object
        NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

        //Load the request in the UIWebView.
        [twitterview loadRequest:requestObj];
        timer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0) target:self selector:@selector(twitterloading) userInfo:nil repeats:YES];

        [self.view addSubview:webview];
</code></pre>

<p>by using this code i can login to twitter and display my encoded message on textfield to post  but it display in encoded form how can i display this in normal text(orginal string formate)please help to me.
 thanks in advance.</p>
