首页 新闻 赞助 找找看

iOS中使用苹果自己的base64编码方法,option应该选哪一个

0
悬赏园豆:20 [已解决问题] 解决于 2015-09-14 17:44
[data base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithCarriageReturn];

这里的

NSDataBase64EncodingEndLineWithCarriageReturn不知道什么意思,一共有四个枚举

    // Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default.

    NSDataBase64Encoding64CharacterLineLength = 1UL << 0,

    NSDataBase64Encoding76CharacterLineLength = 1UL << 1,

 

    // Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF.

    NSDataBase64EncodingEndLineWithCarriageReturn = 1UL << 4,

    NSDataBase64EncodingEndLineWithLineFeed = 1UL << 5,

谁能告诉我后两个是什么意思?

电蚊拍的主页 电蚊拍 | 初学一级 | 园豆:99
提问于:2015-09-09 15:53
< >
分享
最佳答案
1

这四个表示不同的解码算法,1.将最大行长度设置为64个字符,插入你所指定的那一行 2.将最大行长度设置为76个字符,插入你所指定的那一行.3.设置最大行长度64个字符,并可以指定在哪行结束  4.指定最大行长度76个字符,并指定在哪行结束

收获园豆:20
逆时光 | 初学一级 |园豆:142 | 2015-09-10 10:21
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册