1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
|
# File 'lib/brick.rb', line 1837
def encrypt_and_sign(value, *args, expires_at: nil, expires_in: nil, purpose: nil)
encrypted = if method(:_encrypt).arity == 1
_encrypt(value) else
if args.last.is_a?(Hash)
expires_at ||= args.last[:expires_at]
expires_in ||= args.last[:expires_in]
purpose ||= args.last[:purpose]
end
_encrypt(value, expires_at: expires_at, expires_in: expires_in, purpose: purpose)
end
verifier.generate(encrypted)
end
|