I need a simple encryption for some text strings. I want to create coupon codes and make them look cool so subsequently created code should look very different. (And besides
Optional method for encryption and decryption
gem 'activesupport' require 'active_support' key = SecureRandom.random_bytes(32) crypt = ActiveSupport::MessageEncryptor.new(key) encrypted_data = crypt.encrypt_and_sign("your password") password = crypt.decrypt_and_verify(encrypted_data)