{"action":"created","issue":{"url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/44","repository_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted","labels_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/44/comments","events_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/44/events","html_url":"https://github.com/attr-encrypted/attr_encrypted/issues/44","id":7018895,"number":44,"title":"OpenSSL::Cipher::CipherError: wrong final block length","user":{"login":"northband","id":470201,"avatar_url":"https://avatars2.githubusercontent.com/u/470201?v=3","gravatar_id":"","url":"https://api.github.com/users/northband","html_url":"https://github.com/northband","followers_url":"https://api.github.com/users/northband/followers","following_url":"https://api.github.com/users/northband/following{/other_user}","gists_url":"https://api.github.com/users/northband/gists{/gist_id}","starred_url":"https://api.github.com/users/northband/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/northband/subscriptions","organizations_url":"https://api.github.com/users/northband/orgs","repos_url":"https://api.github.com/users/northband/repos","events_url":"https://api.github.com/users/northband/events{/privacy}","received_events_url":"https://api.github.com/users/northband/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2012-09-20T17:21:14Z","updated_at":"2017-03-09T20:16:45Z","closed_at":"2013-11-15T01:23:47Z","body":"Gosh - I can't win - the column is encrypted in the DB (yay) but now I'm getting this when trying to decrypt:\n\nruby-1.9.2-p290 :009 > u.dob\n\nOpenSSL::Cipher::CipherError: wrong final block length\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/encryptor-1.1.3/lib/encryptor.rb:62:in `final'\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/encryptor-1.1.3/lib/encryptor.rb:62:in`crypt'\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/encryptor-1.1.3/lib/encryptor.rb:44:in `decrypt'\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/attr_encrypted-1.2.1/lib/attr_encrypted.rb:179:in`decrypt'\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/attr_encrypted-1.2.1/lib/attr_encrypted.rb:262:in `decrypt'\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/attr_encrypted-1.2.1/lib/attr_encrypted.rb:126:in`block (2 levels) in attr_encrypted'\n    from (irb):9\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in`start'\n    from /Users/northband/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'\n    from script/rails:6:in`require'\n    from script/rails:6:in `<main>'\n\nAny ideas?\n"},"comment":{"url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/comments/285468482","html_url":"https://github.com/attr-encrypted/attr_encrypted/issues/44#issuecomment-285468482","issue_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/44","id":285468482,"user":{"login":"salehrastani","id":8814470,"avatar_url":"https://avatars3.githubusercontent.com/u/8814470?v=3","gravatar_id":"","url":"https://api.github.com/users/salehrastani","html_url":"https://github.com/salehrastani","followers_url":"https://api.github.com/users/salehrastani/followers","following_url":"https://api.github.com/users/salehrastani/following{/other_user}","gists_url":"https://api.github.com/users/salehrastani/gists{/gist_id}","starred_url":"https://api.github.com/users/salehrastani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salehrastani/subscriptions","organizations_url":"https://api.github.com/users/salehrastani/orgs","repos_url":"https://api.github.com/users/salehrastani/repos","events_url":"https://api.github.com/users/salehrastani/events{/privacy}","received_events_url":"https://api.github.com/users/salehrastani/received_events","type":"User","site_admin":false},"created_at":"2017-03-09T20:16:45Z","updated_at":"2017-03-09T20:16:45Z","body":"Try setting the cipher.key value after calling the decrypt or encrypt methods"}}
{"actor":{"display_login":"salehrastani"}}