{"action":"created","issue":{"url":"https://api.github.com/repos/XervoIO/file-encryptor/issues/9","repository_url":"https://api.github.com/repos/XervoIO/file-encryptor","labels_url":"https://api.github.com/repos/XervoIO/file-encryptor/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/XervoIO/file-encryptor/issues/9/comments","events_url":"https://api.github.com/repos/XervoIO/file-encryptor/issues/9/events","html_url":"https://github.com/XervoIO/file-encryptor/issues/9","id":278425354,"node_id":"MDU6SXNzdWUyNzg0MjUzNTQ=","number":9,"title":"Can not decrypt","user":{"login":"Liberateur","id":6575318,"node_id":"MDQ6VXNlcjY1NzUzMTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6575318?v=4","gravatar_id":"","url":"https://api.github.com/users/Liberateur","html_url":"https://github.com/Liberateur","followers_url":"https://api.github.com/users/Liberateur/followers","following_url":"https://api.github.com/users/Liberateur/following{/other_user}","gists_url":"https://api.github.com/users/Liberateur/gists{/gist_id}","starred_url":"https://api.github.com/users/Liberateur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liberateur/subscriptions","organizations_url":"https://api.github.com/users/Liberateur/orgs","repos_url":"https://api.github.com/users/Liberateur/repos","events_url":"https://api.github.com/users/Liberateur/events{/privacy}","received_events_url":"https://api.github.com/users/Liberateur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-01T10:40:52Z","updated_at":"2018-12-05T10:33:04Z","closed_at":null,"author_association":"NONE","body":"Same problem here : https://github.com/XervoIO/file-encryptor/issues/6\r\n\r\nHey hi, I have a problem to decrypt my archive. The archive works normally.\r\n\r\nCODE :\r\n\r\n```\r\n// Get modules\r\nconst fs    = require('fs');\r\nconst crypt = require('file-encryptor');\r\n\r\n// Set key\r\nconst key = '256_CHARACTERS_UTF8';\r\n\r\n// Encrypt archive\r\ncrypt.encryptFile('my_archive_3MB.tar.gz', 'my_archive_3MB.tar.gz.crypt', key, { algorithm: 'aes256' }, (err)=>\r\n{\r\n\t// Decrypt archive\r\n\tcrypt.decryptFile('my_archive_3MB.tar.gz.crypt', 'my_archive_3MB.tar.gz', key, { algorithm: 'aes256' }, (err)=>\r\n\t{\r\n\t\tconsole.log(err);\r\n\t});\r\n});\r\n```\r\n\r\nEXECUTE FILE IN CONSOLE :\r\n\r\n```\r\nError: error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length\r\n    at Decipher.final (crypto.js:158:26)\r\n    at ReadStream.<anonymous> (/Users/cedric/Developer/research/kordacloud/backuper/node_modules/file-encryptor/lib/file-encryptor.js:63:35)\r\n    at emitNone (events.js:91:20)\r\n    at ReadStream.emit (events.js:188:7)\r\n    at endReadableNT (_stream_readable.js:975:12)\r\n    at _combinedTickCallback (internal/process/next_tick.js:80:11)\r\n    at process._tickCallback (internal/process/next_tick.js:104:9)\r\n(node:7968) DeprecationWarning: Calling an asynchronous function without callback is deprecated.\r\n```"},"comment":{"url":"https://api.github.com/repos/XervoIO/file-encryptor/issues/comments/444438011","html_url":"https://github.com/XervoIO/file-encryptor/issues/9#issuecomment-444438011","issue_url":"https://api.github.com/repos/XervoIO/file-encryptor/issues/9","id":444438011,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDQzODAxMQ==","user":{"login":"AndrWeisR","id":34931916,"node_id":"MDQ6VXNlcjM0OTMxOTE2","avatar_url":"https://avatars1.githubusercontent.com/u/34931916?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrWeisR","html_url":"https://github.com/AndrWeisR","followers_url":"https://api.github.com/users/AndrWeisR/followers","following_url":"https://api.github.com/users/AndrWeisR/following{/other_user}","gists_url":"https://api.github.com/users/AndrWeisR/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrWeisR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrWeisR/subscriptions","organizations_url":"https://api.github.com/users/AndrWeisR/orgs","repos_url":"https://api.github.com/users/AndrWeisR/repos","events_url":"https://api.github.com/users/AndrWeisR/events{/privacy}","received_events_url":"https://api.github.com/users/AndrWeisR/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T10:33:04Z","updated_at":"2018-12-05T10:33:04Z","author_association":"NONE","body":"> \r\n> \r\n> Issue is cause your key is invalid, due to padding.\r\n> Here is fix:\r\n> #13\r\nFor me, I don't get the \"wrong final block length\" error in any case.\r\nBut when I add this autopadding fix, it causes the file to not be decrypted in its entirety for me. The last few characters of the file are missing. "}}
{"actor":{"display_login":"AndrWeisR"}}