{"action":"created","issue":{"url":"https://api.github.com/repos/krzyzanowskim/CryptoSwift/issues/32","labels_url":"https://api.github.com/repos/krzyzanowskim/CryptoSwift/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/krzyzanowskim/CryptoSwift/issues/32/comments","events_url":"https://api.github.com/repos/krzyzanowskim/CryptoSwift/issues/32/events","html_url":"https://github.com/krzyzanowskim/CryptoSwift/issues/32","id":59222280,"number":32,"title":"EXC_BAD_INSTRUCTION on AES:218","user":{"login":"bbsan2k","id":1926159,"avatar_url":"https://avatars.githubusercontent.com/u/1926159?v=3","gravatar_id":"","url":"https://api.github.com/users/bbsan2k","html_url":"https://github.com/bbsan2k","followers_url":"https://api.github.com/users/bbsan2k/followers","following_url":"https://api.github.com/users/bbsan2k/following{/other_user}","gists_url":"https://api.github.com/users/bbsan2k/gists{/gist_id}","starred_url":"https://api.github.com/users/bbsan2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbsan2k/subscriptions","organizations_url":"https://api.github.com/users/bbsan2k/orgs","repos_url":"https://api.github.com/users/bbsan2k/repos","events_url":"https://api.github.com/users/bbsan2k/events{/privacy}","received_events_url":"https://api.github.com/users/bbsan2k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-27T11:08:45Z","updated_at":"2015-02-27T11:22:06Z","closed_at":null,"body":"Hi, \r\nCurrently facing in issue in CryptoSwift, AES line 218.\r\n\r\nThis is my code:\r\n\r\n    case let (.Some(data), .Some(iv), .Some(iter), .Some(salt), .Some(aes)):\r\n\t\t\t\tlet (aesPassword, it) = generateAesKeyForPassword(aes, salt: (salt as  String).dataUsingEncoding(NSUTF8StringEncoding)!, roundCount: iter as Int, error: &error)!\r\n\r\n\t\t\t\tlet passString = aesPassword.base64EncodedStringWithOptions(.allZeros)\r\n\t\t\t\tlet iv_data = (iv as String).dataUsingEncoding(NSUTF8StringEncoding)!\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tlet decryptedData = Cipher.AES(key: aesPassword, iv: iv_data, blockMode: .CBC).decrypt((data as String).dataUsingEncoding(NSUTF8StringEncoding)!)\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\nI'm not sure, what causes this issue. The Data I'm trying to decode was encoded with openssl on rails. \r\niv_data and passString are both valid.\r\n"},"comment":{"url":"https://api.github.com/repos/krzyzanowskim/CryptoSwift/issues/comments/76380243","html_url":"https://github.com/krzyzanowskim/CryptoSwift/issues/32#issuecomment-76380243","issue_url":"https://api.github.com/repos/krzyzanowskim/CryptoSwift/issues/32","id":76380243,"user":{"login":"krzyzanowskim","id":758033,"avatar_url":"https://avatars.githubusercontent.com/u/758033?v=3","gravatar_id":"","url":"https://api.github.com/users/krzyzanowskim","html_url":"https://github.com/krzyzanowskim","followers_url":"https://api.github.com/users/krzyzanowskim/followers","following_url":"https://api.github.com/users/krzyzanowskim/following{/other_user}","gists_url":"https://api.github.com/users/krzyzanowskim/gists{/gist_id}","starred_url":"https://api.github.com/users/krzyzanowskim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzyzanowskim/subscriptions","organizations_url":"https://api.github.com/users/krzyzanowskim/orgs","repos_url":"https://api.github.com/users/krzyzanowskim/repos","events_url":"https://api.github.com/users/krzyzanowskim/events{/privacy}","received_events_url":"https://api.github.com/users/krzyzanowskim/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T11:22:06Z","updated_at":"2015-02-27T11:22:06Z","body":"I can't tell without input data. It may be one of the assertion for input parameters.\r\n\r\npassString is never used. I don't know what is result of `generateAesKeyForPassword`. Please separate usecase for Playground."}}