0

谁能帮我添加nsdata

我有 NSData 作为加密数据

<a5ecaf36 15519fcb cd164cf6 a83eaf55 367f1109 b6898951 2c227b86 ed98d0a6 db2d7a8a   25086baf 58436328 2583ed78 ef3410e5 4507d8a4 40fe22f9 0538a67c 065fbb8e ad445041 56f3ea87 e7b73189 aa0b8c66 a9da381e 6f718583 dce57b9a f2f5d9c9 b336c92f b2df2d43 9083bd1d e33e907b 7fd0fdc7 e5f64db9 b7f0975a> 

我想添加 F8 并将其作为 NSData 发送到服务器

4

1 回答 1

3
NSMutableData *mData = [NSMutableData dataWithData:mData];
unsigned char f8[1] = 0xF8;
[mData appendBytes:f8 length:1];

// You can use the mutable data as is or turn it back into a non-mutable object:

data = [NSData dataWithData:mData];
于 2012-08-17T13:36:38.937 回答