• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to convert asn.1 Binary to ASCII?  RSS feed

 
Monica Shiralkar
Ranch Hand
Posts: 922
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know there are some libraries like BinaryNotes but what is the advised way to convert? Can it be done without such external library?

thanks

 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monica. Shiralkar wrote:I know there are some libraries like BinaryNotes but what is the advised way to convert? Can it be done without such external library?

When converting ASN.1 content to ASCII it is normal to BASE64 encode the actual ASN.1 and surround this with a prefix and suffix that indicate what the content represents. For example an RSA private key would look like


Since the prefix and suffix depend on the ASN.1 content this could be difficult to automate since it would require one to parse the ASN.1 to see what preffix and suffix are needed. If one knows the content type then it is a fairly easy to handle. One just BASE64 encodes the ASN.1 ( using something like the apache commons codec library ) and then attaches the appropriate prefix and suffix.

 
Harinath Prabhakaran
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on which ASN.1 format you have, there’s a third-party native CDR processing tool for fast ETL on it, but it looks like they’ll have to do custom work if you use something other than ASN.1 TAP3 now.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!