{"action":"created","issue":{"url":"https://api.github.com/repos/ideawu/Objective-C-RSA/issues/16","labels_url":"https://api.github.com/repos/ideawu/Objective-C-RSA/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/ideawu/Objective-C-RSA/issues/16/comments","events_url":"https://api.github.com/repos/ideawu/Objective-C-RSA/issues/16/events","html_url":"https://github.com/ideawu/Objective-C-RSA/issues/16","id":123627638,"number":16,"title":"为什么我解密返回值为nil；","user":{"login":"lizhi19891120","id":15025353,"avatar_url":"https://avatars.githubusercontent.com/u/15025353?v=3","gravatar_id":"","url":"https://api.github.com/users/lizhi19891120","html_url":"https://github.com/lizhi19891120","followers_url":"https://api.github.com/users/lizhi19891120/followers","following_url":"https://api.github.com/users/lizhi19891120/following{/other_user}","gists_url":"https://api.github.com/users/lizhi19891120/gists{/gist_id}","starred_url":"https://api.github.com/users/lizhi19891120/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizhi19891120/subscriptions","organizations_url":"https://api.github.com/users/lizhi19891120/orgs","repos_url":"https://api.github.com/users/lizhi19891120/repos","events_url":"https://api.github.com/users/lizhi19891120/events{/privacy}","received_events_url":"https://api.github.com/users/lizhi19891120/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-23T09:31:01Z","updated_at":"2015-12-23T13:18:25Z","closed_at":null,"body":"  \r\n    NSData *decryData= [[NSData alloc]initWithBytes:u->data length:256];\r\n    \r\n    NSData *priData = [RSA decryptData:decryData privateKey:priKey];\r\n\r\ndecryData有值，priData 没有值。\r\n\r\n\r\n貌似在这里返回为空的，是不是不能够解密长度为256的data。\r\n\tunsigned char *c_key = (unsigned char *)[d_key bytes];\r\n\tunsigned int  idx\t = 22; //magic byte at offset 22\r\n   \r\n\tif (0x04 != c_key[idx++]) return nil;\r\n\r\n\r\nps，我需要加密和解密的都是byte数组，以为提供的接口是nsdata，所以我需要转为BYTE。\r\n最后还是要感谢你的分享。"},"comment":{"url":"https://api.github.com/repos/ideawu/Objective-C-RSA/issues/comments/166891870","html_url":"https://github.com/ideawu/Objective-C-RSA/issues/16#issuecomment-166891870","issue_url":"https://api.github.com/repos/ideawu/Objective-C-RSA/issues/16","id":166891870,"user":{"login":"ideawu","id":3202758,"avatar_url":"https://avatars.githubusercontent.com/u/3202758?v=3","gravatar_id":"","url":"https://api.github.com/users/ideawu","html_url":"https://github.com/ideawu","followers_url":"https://api.github.com/users/ideawu/followers","following_url":"https://api.github.com/users/ideawu/following{/other_user}","gists_url":"https://api.github.com/users/ideawu/gists{/gist_id}","starred_url":"https://api.github.com/users/ideawu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ideawu/subscriptions","organizations_url":"https://api.github.com/users/ideawu/orgs","repos_url":"https://api.github.com/users/ideawu/repos","events_url":"https://api.github.com/users/ideawu/events{/privacy}","received_events_url":"https://api.github.com/users/ideawu/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T13:18:25Z","updated_at":"2015-12-23T13:18:25Z","body":"能加密长数据, 不会有问题. 建议你提供完整的可运行的代码, 方便查问题."}}