{"action":"created","issue":{"url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/77","labels_url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/77/comments","events_url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/77/events","html_url":"https://github.com/zhaozg/lua-openssl/issues/77","id":107652455,"number":77,"title":"about base64","user":{"login":"wonderwj","id":270140,"avatar_url":"https://avatars.githubusercontent.com/u/270140?v=3","gravatar_id":"","url":"https://api.github.com/users/wonderwj","html_url":"https://github.com/wonderwj","followers_url":"https://api.github.com/users/wonderwj/followers","following_url":"https://api.github.com/users/wonderwj/following{/other_user}","gists_url":"https://api.github.com/users/wonderwj/gists{/gist_id}","starred_url":"https://api.github.com/users/wonderwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wonderwj/subscriptions","organizations_url":"https://api.github.com/users/wonderwj/orgs","repos_url":"https://api.github.com/users/wonderwj/repos","events_url":"https://api.github.com/users/wonderwj/events{/privacy}","received_events_url":"https://api.github.com/users/wonderwj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-22T06:18:34Z","updated_at":"2015-09-22T08:34:25Z","closed_at":"2015-09-22T08:33:30Z","body":"base64编码会自动换行，而解码的时候是设置了 BIO_FLAGS_BASE64_NO_NL标识，不处理换行，所以造成对长数据进行base64编码之后，用此函数的解码会失败。\r\n\r\n为了通用，是否应该在编码是也设置BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL); ？？"},"comment":{"url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/comments/142212500","html_url":"https://github.com/zhaozg/lua-openssl/issues/77#issuecomment-142212500","issue_url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/77","id":142212500,"user":{"login":"zhaozg","id":542599,"avatar_url":"https://avatars.githubusercontent.com/u/542599?v=3","gravatar_id":"","url":"https://api.github.com/users/zhaozg","html_url":"https://github.com/zhaozg","followers_url":"https://api.github.com/users/zhaozg/followers","following_url":"https://api.github.com/users/zhaozg/following{/other_user}","gists_url":"https://api.github.com/users/zhaozg/gists{/gist_id}","starred_url":"https://api.github.com/users/zhaozg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhaozg/subscriptions","organizations_url":"https://api.github.com/users/zhaozg/orgs","repos_url":"https://api.github.com/users/zhaozg/repos","events_url":"https://api.github.com/users/zhaozg/events{/privacy}","received_events_url":"https://api.github.com/users/zhaozg/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T08:34:24Z","updated_at":"2015-09-22T08:34:24Z","body":"--- base64 encode or decode\r\n-- @tparam string|bio input\r\n-- @tparam[opt=true] boolean encode true to encoed, false to decode\r\n-- @tparam[opt=false] boolean NO_NL true without newline, false with newline\r\n-- @treturn string\r\nfunction base64() end"}}