Before you save a password to a database, it may make sense to encrypt it. That way, when you do some user authentication, you can compare the users submitted password to the one on the database.
#A. Import the SHA1 Method
require "digest/sha1"
#B. Encrypt the Password string
@hash_pass = Digest::SHA1.hexdigest('super password')
#C. Display the encrypted password
puts @hash_pass
![Installing Vue + Rails 6](/content/images/size/w800/2023/03/chrisjmendez-vue-rails.png)
Deploying Rails 5.x on AWS ElasticBeanstalk using AWS CodeCommit
How to deploy your Rails app on ElasticBeanstalk (including S3 buckets, security groups, load balancers, auto-scalling groups and more) using CodeCommit.
![How to install Rails 6.x on a Mac](/content/images/size/w800/2023/03/chrisjmendez-rails.png)
Subscribe to new posts
Processing your application
Please check your inbox and click the link to confirm your subscription
There was an error sending the email