Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 744611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:59:53+00:00 2026-05-14T08:59:53+00:00

I am using require ‘digest/sha1’ to encrypt my password and save into database. During

  • 0

I am using require 'digest/sha1' to encrypt my password and save into database. During login I authenticate by matching the encrypted password saved in database and again encrypted the one use enter in password field. As of now everything works fine but now I want to do ‘Forgot Password’ functionality. To do this I need to decrypt the password which is saved in database to find original one. How to decrypt using digest/sha1?
Or does anyone know any algorithm which supports encryption & decryption as well?

I am using ruby on rails so I need Ruby way to accomplish it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:59:54+00:00Added an answer on May 14, 2026 at 8:59 am

    SHA1 is a one way function you can’t reverse it.

    This may be of interest re password resets:
    http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/

    If you want to do encryption/decryption then you should use something like AES. Once you start using encryption/decryption, however, you’ll also have to start worrying about key management too.

    Regarding your comment to the OP below – if you are going to to be storing CC info, I would advise you get a security person in who knows about crypto, key management etc and who also understands the relevant legal and regulatory aspects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading some template files into my application using require.js like so: define(function(require)
Using Require.js and it works pretty solid. However, I'm reading about optimization (http://requirejs.org/docs/optimization.html) using
Am using require.js to load backbone, and my other scripts, but i get an
I have found that I have no problem using require to load something like
Is there any way to include php file using require and calling a php
I've been messing around with a backbone.js app using require.js and a handlebars templates
I'm trying to add jQuery using Greasemonkey's @require / @include method, but it doesn't
I require help to search a text file (log file) using c# and display
I was wondering if using require() in node.js was the equivalent to lazy loading?
I can go one way using require 'json' def saveUserLib(user_lib) File.open(/Users/name/Documents/user_lib.json,w) do |f| f.write($user_lib.to_json)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.