Devise正在使用bcryptgem进行加密(https://github.com/codahale/bcrypt-ruby),您也可以在此处查看Devise的运行方式:https://github.com/plataformatec/devise/blob/f39c6fd92774cb66f96f546d8d5e8281542b4e78/ lib / devise / encryptor.rb
有关该算法的更多详细信息,可以在这里查看:https : //github.com/codahale/bcrypt-ruby/blob/master/lib/bcrypt/password.rb
希望能有所帮助