class method
self.key_len
Ruby on Rails 5.1.7
Since v4.2.11.3Signature
self.key_len(cipher = DEFAULT_CIPHER)
Given a cipher, returns the key length of the cipher to help generate the key of desired size
Parameters
-
cipheropt = DEFAULT_CIPHER
Source
# File activesupport/lib/active_support/message_encryptor.rb, line 88
def self.key_len(cipher = DEFAULT_CIPHER)
OpenSSL::Cipher.new(cipher).key_len
end
Defined in activesupport/lib/active_support/message_encryptor.rb line 88
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::MessageEncryptor