dongmeng1868 2016-12-30 02:34
浏览 453
已采纳

在laravel中URL加密的方式是什么?

I am passing the POST Id values through the URL like this

localhost:81/laravel/public/Application/1956458 

So I would like to encrypt the Keys in the address bar. How can i achieve that?

  • 写回答

2条回答 默认 最新

  • duanshan1856 2016-12-30 02:35
    关注

    There are some different ways to Encrypt your password,

    1. Normal Encryption.

    This is a strong AES encryption via the Mcrypt PHP extension,

    $encrypted = Crypt::encrypt($id);
    

    And also you can decrypt this encrypted values using this command,

    $decrypted = Crypt::decrypt($encrypted);
    

    2. Hashing A Password Using Bcrypt in Laravel.

    This will create a hashed password. You may use it in your controller or even in a model.

    $encrypted = Hash::make($id);
    

    3. Direct Use Bcrypt.

    In Laravel 5 you can directly encrypt the password using Bcrypt,

    $encrypted = bcrypt($id);     
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿