-1
我有一个OCTET_STRING_t
包含二进制数据。我正在使用ASN1C加载苹果的应用商店收据数据。这里有一些示例代码:将OCTET_STRING_t转换为NSData?
// Walk the attributes
for (i = 0; i < payload->list.count; i++) {
ReceiptAttribute_t *entry = payload->list.array[i];
switch (entry->type) {
case 5: // 5 = hash
OCTET_STRING_t *hash = &entry->value;
break;
...
}
}
什么是将其转换为NSData容器的正确方法?