Re: OCTET_STRING_t -> NSString?
Re: OCTET_STRING_t -> NSString?
- Subject: Re: OCTET_STRING_t -> NSString?
- From: "Stephen J. Butler" <email@hidden>
- Date: Tue, 29 Mar 2011 12:50:38 -0500
On Tue, Mar 29, 2011 at 12:24 PM, Todd Heberlein <email@hidden> wrote:
> In particular, the beginning of the OCTET_STRING_t's buffer begins with two bytes (decimal values 12 and 21). Am I supposed to skip these? For example, the following code where I skip these first two bytes seems to work, but it seems like a big hack:
I'm not familiar with validating app store bundles, as I'm not
(currently) a paid developer. But what is this, ANS.1 BER encoding?
Then the first byte is the tag (the type of data to follow), the
second byte the length (21), and then the next 21 bytes the data.
Indeed, Wikipedia (http://en.wikipedia.org/wiki/Basic_Encoding_Rules)
says that tag 12 is UTF8String. I'd recommend using liblber (man
lber-decode) if you have to do anything other than basic work with
this format.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden