{"action":"created","issue":{"url":"https://api.github.com/repos/digitalbazaar/forge/issues/324","labels_url":"https://api.github.com/repos/digitalbazaar/forge/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/digitalbazaar/forge/issues/324/comments","events_url":"https://api.github.com/repos/digitalbazaar/forge/issues/324/events","html_url":"https://github.com/digitalbazaar/forge/issues/324","id":116036545,"number":324,"title":"forge.cipher returns fewer bytes ","user":{"login":"dimitrirostavo","id":8924779,"avatar_url":"https://avatars.githubusercontent.com/u/8924779?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitrirostavo","html_url":"https://github.com/dimitrirostavo","followers_url":"https://api.github.com/users/dimitrirostavo/followers","following_url":"https://api.github.com/users/dimitrirostavo/following{/other_user}","gists_url":"https://api.github.com/users/dimitrirostavo/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitrirostavo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitrirostavo/subscriptions","organizations_url":"https://api.github.com/users/dimitrirostavo/orgs","repos_url":"https://api.github.com/users/dimitrirostavo/repos","events_url":"https://api.github.com/users/dimitrirostavo/events{/privacy}","received_events_url":"https://api.github.com/users/dimitrirostavo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-10T06:19:33Z","updated_at":"2015-11-23T16:10:02Z","closed_at":null,"body":"Hi there, \r\nFirstly, i want to say that the forge library is a god sent. It is really awesome. \r\n\r\nSecondly, I have a question \r\n\r\nI have this example \r\n\r\n```javascript\r\n                                var decipher = forge.cipher.createDecipher('AES-CBC', aesKey);\r\n                                 //encryptedData is just an ArrayBuffer.\r\n\t\t\t\tvar decryptedData = new forge.util.ByteStringBuffer(encryptedData.byteLength);\r\n\t\t\t\tdecipher.start({iv:iv,\r\n\t\t\t\t\toutput:decryptedData\r\n\t\t\t\t});\r\n\t\t\t\tvar buffer = forge.util.createBuffer(encryptedData);\r\n\t\t\t\tdecipher.update(buffer);\r\n\t\t\t\tdecipher.finish();\r\n                               \r\n```\r\nIs there any reason for decryptedData.length not the same as encryptedData.byteLength ? \r\n\r\nWhat I am seeing is that encryptedData.byteLength is 64 \r\nand decryptedData.length is coming back as 34.\r\n\r\nAny help would be greatly appreciated. "},"comment":{"url":"https://api.github.com/repos/digitalbazaar/forge/issues/comments/158981872","html_url":"https://github.com/digitalbazaar/forge/issues/324#issuecomment-158981872","issue_url":"https://api.github.com/repos/digitalbazaar/forge/issues/324","id":158981872,"user":{"login":"dlongley","id":168137,"avatar_url":"https://avatars.githubusercontent.com/u/168137?v=3","gravatar_id":"","url":"https://api.github.com/users/dlongley","html_url":"https://github.com/dlongley","followers_url":"https://api.github.com/users/dlongley/followers","following_url":"https://api.github.com/users/dlongley/following{/other_user}","gists_url":"https://api.github.com/users/dlongley/gists{/gist_id}","starred_url":"https://api.github.com/users/dlongley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlongley/subscriptions","organizations_url":"https://api.github.com/users/dlongley/orgs","repos_url":"https://api.github.com/users/dlongley/repos","events_url":"https://api.github.com/users/dlongley/events{/privacy}","received_events_url":"https://api.github.com/users/dlongley/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T16:10:02Z","updated_at":"2015-11-23T16:10:02Z","body":"@dimitrirostavo,\r\n\r\nCBC mode encryption adds padding, that's why the encrypted data is larger than the decrypted data."}}