class ComplexConfig::Encryption
def encrypt(text)
def encrypt(text) @cipher.encrypt @cipher.key = @secret iv = @cipher.random_iv @cipher.auth_data = "" encrypted = @cipher.update(Marshal.dump(text)) encrypted << @cipher.final [ encrypted, iv, @cipher.auth_tag ].map { |v| base64_encode(v) }.join('--') end