title: ActiveSupport::MessageVerifier::InvalidSignature: ActiveSupport::MessageVerifier::InvalidSignature Error in rails 5
body: <p>Before migrating to rails 5 it was working nicely, but when I migrated to rails 5.1.1 it is giving me error like </p>
  
  <blockquote>
    <p>ActiveSupport::MessageVerifier::InvalidSignature:
    ActiveSupport::MessageVerifier::InvalidSignature</p>
  </blockquote>
  
  <p>I have used same key that we were using in the previous version of rails.</p>
  
  <p>Ex.</p>
  
  <pre><code>crypt = ActiveSupport::MessageEncryptor.new(Rails.configuration.secret_key_base)
  </code></pre>
  
  <p>After executing following line I am getting the mentioned error.</p>
  
  <pre><code>@password = crypt.decrypt_and_verify(User.last.encryptedpass)
  </code></pre>