File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes OCTET String and IA5String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "OCTET String and IA5String" Watch "OCTET String and IA5String" New topic
Author

OCTET String and IA5String

Howie Jiang
Greenhorn

Joined: Aug 25, 2003
Posts: 26
What are OCTET String and IA5String? If I have binary data of them? How can I get the original readable data?

Thanks
Michael Fitzmaurice
Ranch Hand

Joined: Aug 22, 2001
Posts: 168
Hi

How you would go about converting the binary back into human readable format depends on how it was converted to binary in the first place and what it represents. How did the binary you need to work with come to be in your possession? You need to know whether the binary represents and IA5 string or an octet string in the first place, then you can go about converting it from binary.

IA5 is a character set that is almost the same as ASCII - it uses 7 bytes. Octet strings use 8 bit bytes, as the name suggests.

Hope this helps

Michael


"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
Yogesh Kodgule
Greenhorn

Joined: Oct 02, 2003
Posts: 29
FYI,
for handling the Encoding and Decoding of the Asn1 types (as IA5String and OctetString belong to Asn1 types), varioud encode / decode methods are used.
Some of them are:
1) Basic Encoding Rules (BER)
2) Packed Encoding Rules (PER)
3) DER
4) OER
BER follows Tag-Length-Value (TLV) Format and is simple.PER follows a complicated steucture and hence is a complex process. But PER Encoded values are more compact as compared to BER.

Hope this may help you a bit!


"Thinking of doing something is also doing something ...so don't just stop thinking!"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OCTET String and IA5String