首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Fairplay SPC请求返回空

Fairplay SPC请求返回空
EN

Stack Overflow用户
提问于 2015-07-07 04:27:17
回答 1查看 1.4K关注 0票数 4

我正在尝试使用streamingContentKeyRequestDataForApp:contentIdentifier:options:error:;AVAssetResourceLoadingRequest方法来获取SPC键,但是返回给我的不是预期的SPC值,而是nil。我主要引用提供的Fairplay应用程序示例。我使用编码的request URL主机字符串作为内容标识符,使用从SPC服务器检索的.DER证书作为应用程序数据。还有没有人遇到过这个问题?

代码语言:javascript
运行
复制
NSString *hostString = [URL host];  
NSData *assetId        = [NSData dataWithBytes:[hostString cStringUsingEncoding:NSUTF8StringEncoding] length:[hostString lengthOfBytesUsingEncoding:NSUTF8StringEncoding]];  
NSData *certificate = (obtained via Key Server).  

NSError *error;  
NSData *SPC = [loadingRequest streamingContentKeyRequestDataForApp:certificate contentIdentifier:assetId options:nil error:&error]  

SPC在这里的输出是nil。完整的错误描述如下:

代码语言:javascript
运行
复制
Error Domain=AVFoundationErrorDomain  
Code=-11800 "The operation could not be completed"   
UserInfo=0x170461980  
{NSUnderlyingError=0x1740548e0 "The operation couldn’t be completed. (OSStatus error -12640.)",  
NSLocalizedFailureReason=An unknown error occurred (-12640),  
NSLocalizedDescription=The operation could not be completed}  
EN

回答 1

Stack Overflow用户

发布于 2015-07-17 01:10:19

事实证明,使用SAMPLE-AES加密没有正确地加密测试流。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31254992

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档