You Are Here:

Community: Developer Discussion Boards

#1 Old String and binary - 2007-08-02, 23:27

Join Date: May 2007
Posts: 540
Location: Poland
nuker85
Offline
Super Contributor
Hello
I m trying to use XOR algorithm. I d like to know how display binary data in List.

When i put string into byte array, make XOR with byte arrays and then get back binary data in a string to display it using append function i get ASCII char number

Is tehre any function which i can use to get binary data ?

Thanks in advance

Nuker
Reply With Quote

#2 Old Re: String and binary - 2007-08-05, 10:35

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Quote:
Originally Posted by nuker85 View Post
Hello
get back binary data in a string to display it using append function
Could you post the code you are using to do this? Because I suspect this is where your error is "hiding".

shmoove
Reply With Quote

#3 Old Re: String and binary - 2007-08-08, 09:26

Join Date: May 2007
Posts: 540
Location: Poland
nuker85
Offline
Super Contributor
Hello,
thanks for being interest in my post

It s part of my code:

byte[] maska,stworzony,wpisany;

stworzony=kod.getBytes(); // kod is a string
if i display few elements converted to string from stworzny array i get correct ASCII code from kod variable

Using XOR:


String[] chhaslo= new String[kod.length()];

Integer aaa;
for (int i=0;i<kod.length();i++)
{
aaa=new Integer( stworzony[i] ^ mask[i] );
chhaslo[i] = aaa.toString();

}




When i display variably chhaslo on the screen i get ascii code (it looks like ascii)

when i do xor again using my mask get something different than i had at the begining

How can i display binary (1010) data on the list or form

What am i doing wrong?

Thanks

Nuker
Reply With Quote

#4 Old Re: String and binary - 2007-08-08, 13:46

Join Date: May 2007
Posts: 540
Location: Poland
nuker85
Offline
Super Contributor
Thanks for interest

I have solved my problem.

Good luck

Nuker
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Binary Messages on 3410 phone using J2ME affinitystudios Mobile Java General 3 2008-09-23 11:58
string to binary egc_33 Mobile Java General 1 2007-01-17 16:16
Convert from string to decimal and to binary thebig81 General Symbian C++ 1 2005-08-14 13:05
Sending binary SMSs from WMA pawel_z General Messaging 1 2003-09-27 01:08
How to send binary SMS??? le0n9 Smart Messaging 1 2003-03-26 15:46

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia