instance method
length_after_encode
Ruby on Rails 7.2.3
Since v7.1.6 Private — implementation detail, not part of the public APISignature
length_after_encode(length_before_encode)
No documentation comment.
Parameters
-
length_before_encodereq
Source
# File activesupport/lib/active_support/message_encryptor.rb, line 320
def length_after_encode(length_before_encode)
if @url_safe
(4 * length_before_encode / 3.0).ceil # length without padding
else
4 * (length_before_encode / 3.0).ceil # length with padding
end
end
Defined in activesupport/lib/active_support/message_encryptor.rb line 320
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::MessageEncryptor