{"action":"created","issue":{"url":"https://api.github.com/repos/AArnott/PCLCrypto/issues/9","labels_url":"https://api.github.com/repos/AArnott/PCLCrypto/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/AArnott/PCLCrypto/issues/9/comments","events_url":"https://api.github.com/repos/AArnott/PCLCrypto/issues/9/events","html_url":"https://github.com/AArnott/PCLCrypto/issues/9","id":57185952,"number":9,"title":"Attempting to JIT compile method","user":{"login":"pricimus","id":8338159,"avatar_url":"https://avatars.githubusercontent.com/u/8338159?v=3","gravatar_id":"","url":"https://api.github.com/users/pricimus","html_url":"https://github.com/pricimus","followers_url":"https://api.github.com/users/pricimus/followers","following_url":"https://api.github.com/users/pricimus/following{/other_user}","gists_url":"https://api.github.com/users/pricimus/gists{/gist_id}","starred_url":"https://api.github.com/users/pricimus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pricimus/subscriptions","organizations_url":"https://api.github.com/users/pricimus/orgs","repos_url":"https://api.github.com/users/pricimus/repos","events_url":"https://api.github.com/users/pricimus/events{/privacy}","received_events_url":"https://api.github.com/users/pricimus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-10T15:03:52Z","updated_at":"2015-12-22T20:47:48Z","closed_at":"2015-02-10T17:12:05Z","body":"Hi - I am using your PCLCrypto package to encrypt/decrypt strings in our Android/iOS app. I've defined two simple methods that use the classes and support from the package as follows:\r\n\r\n\t\tpublic string Encrypt(string stringToEncrypt, string cryptoKey)\r\n\t\t{\r\n\t\t\tbyte[] keyMaterial = System.Text.Encoding.UTF8.GetBytes (cryptoKey);\r\n\t\t\tbyte[] data = System.Text.Encoding.UTF8.GetBytes (stringToEncrypt);\r\n\t\t\tvar provider = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesCbcPkcs7);\r\n\t\t\tvar key = provider.CreateSymmetricKey (keyMaterial);\r\n\t\t\tbyte[] cipherText = WinRTCrypto.CryptographicEngine.Encrypt(key, data);\r\n\r\n\t\t\treturn Convert.ToBase64String (cipherText);\r\n\t\t}\r\n\r\n\t\tpublic string Decrypt(string stringToDecrypt, string cryptoKey)\r\n\t\t{\r\n\t\t\tbyte[] keyMaterial = System.Text.Encoding.UTF8.GetBytes (cryptoKey);\r\n\t\t\tbyte[] data = Convert.FromBase64String (stringToDecrypt);\r\n\t\t\tvar provider = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesCbcPkcs7);\r\n\t\t\tvar key = provider.CreateSymmetricKey(keyMaterial);\r\n\t\t\tbyte[] plainText = WinRTCrypto.CryptographicEngine.Decrypt(key, data);\r\n\r\n\t\t\treturn System.Text.Encoding.UTF8.GetString(plainText, 0, plainText.Length);\r\n\t\t}\r\n\r\nBu when I run in iOS, I see the following errors:\r\n\r\nSystem.ExecutionEngineException: Attempting to JIT compile method 'CryptoHelper:Decrypt (string,string)' while running with --aot-only\r\n\r\nAny ideas?\r\n\r\nThanks,\r\nEd\r\n"},"comment":{"url":"https://api.github.com/repos/AArnott/PCLCrypto/issues/comments/166725972","html_url":"https://github.com/AArnott/PCLCrypto/issues/9#issuecomment-166725972","issue_url":"https://api.github.com/repos/AArnott/PCLCrypto/issues/9","id":166725972,"user":{"login":"AArnott","id":3548,"avatar_url":"https://avatars.githubusercontent.com/u/3548?v=3","gravatar_id":"","url":"https://api.github.com/users/AArnott","html_url":"https://github.com/AArnott","followers_url":"https://api.github.com/users/AArnott/followers","following_url":"https://api.github.com/users/AArnott/following{/other_user}","gists_url":"https://api.github.com/users/AArnott/gists{/gist_id}","starred_url":"https://api.github.com/users/AArnott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AArnott/subscriptions","organizations_url":"https://api.github.com/users/AArnott/orgs","repos_url":"https://api.github.com/users/AArnott/repos","events_url":"https://api.github.com/users/AArnott/events{/privacy}","received_events_url":"https://api.github.com/users/AArnott/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T20:47:48Z","updated_at":"2015-12-22T20:47:48Z","body":"Given the regression you're seeing I suspect the fault is in the Xamarin aot compiler. I don't know how to workaround it."}}