Note that there are some explanatory texts on larger screens.

plurals
  1. POIA5STRING ASN.1 coding format: in-app purchase receipt validation and decoding
    primarykey
    data
    text
    <p>I'm trying to figure out if IA5STRING format (ASN.1) is actually equivalent to ASCII. That is, should I be able to do:</p> <pre><code>NSString *ia5StringWithDate = [[NSString alloc] initWithBytes:is5StringData length:is5StringLength encoding:NSASCIIStringEncoding]; </code></pre> <p>Here is the context:</p> <p>I'm working from <a href="https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Introduction.html#//apple_ref/doc/uid/TP40010573-CH105-SW1" rel="nofollow noreferrer">this apple doc</a> and from WWDC 2013 session "Using Receipts to Protect Your Digital Sales". </p> <p>I've got most of my code worked out (untested yet!), but in attempting to actually pull out the in-app purchase portion of the receipt, the in-app purchase receipt field Purchase Date is described as being an RFC 3339 date. Given that I have an RFC 3339 date as an NSString, I think I've got a method to convert the NSString date to an NSDate (see <a href="https://stackoverflow.com/questions/14447693/how-to-format-convert-the-string-2013-01-27t0231470800-into-nsdate">How to format convert the string 2013-01-27T02:31:47+08:00 into NSDate</a>). But, the format of the Purchase Date is given as IA5STRING (see <a href="https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW12" rel="nofollow noreferrer">this reference</a>).</p> <p>From <a href="http://en.wikipedia.org/wiki/IA5STRING" rel="nofollow noreferrer">the Wiki page for IA5STRING</a>, it says "Those characters are generally equivalent to the first 128 characters of the ASCII alphabet". I don't like the sound of "generally". </p> <p><a href="http://luca.ntop.org/Teaching/Appunti/asn1.html" rel="nofollow noreferrer">This reference</a> suggests that IA5STRING's are the same as ASCII.</p> <p>Thoughts?</p> <p>Thanks, Chris. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload