{"action":"created","issue":{"url":"https://api.github.com/repos/kokke/tiny-AES128-C/issues/14","labels_url":"https://api.github.com/repos/kokke/tiny-AES128-C/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/kokke/tiny-AES128-C/issues/14/comments","events_url":"https://api.github.com/repos/kokke/tiny-AES128-C/issues/14/events","html_url":"https://github.com/kokke/tiny-AES128-C/issues/14","id":58394055,"number":14,"title":"Encrypt string with dash will decrypt badly","user":{"login":"xArthasx","id":422970,"avatar_url":"https://avatars.githubusercontent.com/u/422970?v=3","gravatar_id":"","url":"https://api.github.com/users/xArthasx","html_url":"https://github.com/xArthasx","followers_url":"https://api.github.com/users/xArthasx/followers","following_url":"https://api.github.com/users/xArthasx/following{/other_user}","gists_url":"https://api.github.com/users/xArthasx/gists{/gist_id}","starred_url":"https://api.github.com/users/xArthasx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xArthasx/subscriptions","organizations_url":"https://api.github.com/users/xArthasx/orgs","repos_url":"https://api.github.com/users/xArthasx/repos","events_url":"https://api.github.com/users/xArthasx/events{/privacy}","received_events_url":"https://api.github.com/users/xArthasx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-20T18:48:52Z","updated_at":"2015-03-10T18:20:41Z","closed_at":null,"body":"I think it's the dashes.\r\n\r\n\tuint8_t input[17] = \"2014-02-20 13:27\";\r\n\t// strftime((char*)input, sizeof(input), \"%Y-%m-%d %H %M\", &tstruct);\r\n\tstd::cout << input<<\"\\n\";\r\n\tuint8_t output[ sizeof(input) +16];\r\n\tAES128_ECB_encrypt(input, key, output);\r\n\tsize_t size = sizeof(output);\r\n\tuint8_t decrypted[17];\r\n\tAES128_ECB_decrypt(output, key, decrypted);\r\n\tstd::cout << decrypted<< \"\\n\";\r\nWill output:\r\n![image](https://cloud.githubusercontent.com/assets/422970/6307088/0d850094-b907-11e4-8e9e-61a6e901356f.png)"},"comment":{"url":"https://api.github.com/repos/kokke/tiny-AES128-C/issues/comments/78115197","html_url":"https://github.com/kokke/tiny-AES128-C/issues/14#issuecomment-78115197","issue_url":"https://api.github.com/repos/kokke/tiny-AES128-C/issues/14","id":78115197,"user":{"login":"reattiva","id":5704756,"avatar_url":"https://avatars.githubusercontent.com/u/5704756?v=3","gravatar_id":"","url":"https://api.github.com/users/reattiva","html_url":"https://github.com/reattiva","followers_url":"https://api.github.com/users/reattiva/followers","following_url":"https://api.github.com/users/reattiva/following{/other_user}","gists_url":"https://api.github.com/users/reattiva/gists{/gist_id}","starred_url":"https://api.github.com/users/reattiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reattiva/subscriptions","organizations_url":"https://api.github.com/users/reattiva/orgs","repos_url":"https://api.github.com/users/reattiva/repos","events_url":"https://api.github.com/users/reattiva/events{/privacy}","received_events_url":"https://api.github.com/users/reattiva/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T18:20:41Z","updated_at":"2015-03-10T18:20:41Z","body":"Hi, *AES128_ECB_encrypt* works only on one block (16 bytes), your string has 17 bytes, so the null terminator (the 17° byte) is not encrypted nor decrypted.\r\nIf you try with the string \"2014-02-20 13:2\" it should work."}}