Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

plain text or string to Binary conversion ???

Status
Not open for further replies.

6839470

Programmer
Mar 7, 2004
45
0
0
US
how to convert Plain text input to binary ....
sumanth
 
Are you converting an ASCII representation of a binary number (i.e., 01000111000) or are you looking for the binary values of the ASCII characters?

Bob Rashkin
rrashkin@csc.com
 
I am trying to get binary number.....so that i can pick 8, 16 and 32 element from that string .....
thanks
 
OK. If I understand correctly maybe this will help.
Let's start with a string: 01000101 (hex 45)
% set as 01000101
01000101
% set bs [binary format B8 $as]
E

Bob Rashkin
rrashkin@csc.com
 
The thing is I am trying to implement DES algorithm for which ..I need to have plain text which is converted to 64 bit binary numbers from which I remove 8 16 24 ..... to get a new key of 56 bit. which I later divide into 28 each to encrypt
thanks
sumanth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top