def encrypt_and_sign(value, expires_at: nil, expires_in: nil, purpose: nil)
      verifier.generate(_encrypt(value, expires_at: expires_at, expires_in: expires_in, purpose: purpose))
    end
def encrypt_and_sign(value, expires_at: nil, expires_in: nil, purpose: nil)
      verifier.generate(_encrypt(value, expires_at: expires_at, expires_in: expires_in, purpose: purpose))
    end
Initialize a new MessageEncryptor. +secret+ must be at least as long as
 the cipher key size. For the default 'aes-256-gcm' cipher, this is 256
 bits. If you are using a user-entered secret, you can generate a suitable
 key by using <tt>ActiveSupport::KeyGenerator</tt> or a similar key
 derivation function.

 First additional parameter is used as the signature key for +MessageVerifier+.
 This allows you to specify keys to encrypt and sign data.

    ActiveSupport::MessageEncryptor.new('secret', 'signature_secret')

 Options:
 * <tt>:cipher</tt>     - Cipher to use. Can be any cipher returned by
   <tt>OpenSSL::Cipher.ciphers</tt>. Default is 'aes-256-gcm'.
 * <tt>:digest</tt> - String of digest to use for signing. Default is
   +SHA1+. Ignored when using an AEAD cipher like 'aes-256-gcm'.
 * <tt>:serializer</tt> - Object serializer to use. Default is +Marshal+.
 Encrypt and sign a message. We need to sign the message in order to avoid
 padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/.