Encryption

Configuration

Before using Nova's encrypter, you should set the ENCRYPT_KEY option of your app/Config.php configuration file to a 32 character, random string. If this value is not properly set, all values encrypted by Nova will be insecure.

For an easy way to set an encryption key, navigate to your project directory and use php nova make:key in your console/terminal.

Basic Usage

Encrypting a value

You may encrypt a value using the Crypt facade. All encrypted values are encrypted using OpenSSL and the AES-256-CBC cipher. Furthermore, all encrypted values are signed with a message authentication code (MAC) to detect any modifications to the encrypted string.

use Crypt;

Crypt::encrypt($secret);

Decrypting a value

Of course, you may decrypt values using the decrypt method on the Crypt facade. If the value can not be properly decrypted, such as when the MAC is invalid, an Encryption\DecryptException will be thrown:

use Crypt;
use Encryption\DecryptException; try {
$decrypted = Crypt::decrypt($encryptedValue);
} catch (DecryptException $e) {
//
}

Encryption的更多相关文章

  1. Dynamics CRM 2015-Data Encryption激活报错

    在CRM的日常开发中,Data Encryption经常是不得不开启的一个功能.但是有时,我们可能遇到一种情况,Organization导入之后,查看Data Encryption是已激活的状态,但是 ...

  2. backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized.

    昨天在检查YourSQLDba备份时,发现有台数据库做备份时出现了下面错误信息,如下所示: <Exec>   <ctx>yMaint.ShrinkLog</ctx> ...

  3. SQL Server 2014 Backup Encryption

    转载自: Microsoft MVP Award Program Blog 来源:Microsoft MVP Award Program Blog 的博客:https://blogs.msdn.mic ...

  4. XShell 无法匹配的outgoing encryption算法 ,No matching outgoing encryption algorithm found

    在链接的属性(SSH -> 安全性) 的加密算法列表中选择 aes256-ctr, mac加密列表中选择hmac-sha2-256,保存即可 To enable hmac-sha2-256 an ...

  5. SQL Server安全(9/11):透明数据加密(Transparent Data Encryption)

    在保密你的服务器和数据,防备当前复杂的攻击,SQL Server有你需要的一切.但在你能有效使用这些安全功能前,你需要理解你面对的威胁和一些基本的安全概念.这篇文章提供了基础,因此你可以对SQL Se ...

  6. SQL Server安全(8/11):数据加密(Data Encryption)

    在保密你的服务器和数据,防备当前复杂的攻击,SQL Server有你需要的一切.但在你能有效使用这些安全功能前,你需要理解你面对的威胁和一些基本的安全概念.这篇文章提供了基础,因此你可以对SQL Se ...

  7. 同态加密-Homomorphic encryption

    同态加密(Homomorphic encryption)是一种加密形式,它允许人们对密文进行特定的代数运算得到仍然是加密的结果,将其解密所得到的结果与对明文进行同样的运算结果一样.换言之,这项技术令人 ...

  8. PKCS #1 RSA Encryption Version 1.5

    PKCS #1  RSA Encryption Version 1.5 在进行RSA运算时需要将源数据D转化为Encryption block(EB).其中pkcs1padding V1.5的填充模式 ...

  9. GSM cell phone calls use outdated encryption that can now be cracked with rainbow tables on a PC

    Decrypting GSM phone calls Motivation. GSM telephony is the world’s most popular communication techn ...

  10. IOS常用加密Encryption

    NSString+Encryption.h // // NSString+Encryption.h // haochang // // Created by Administrator on 14-4 ...

随机推荐

  1. JQuery focus()

    跳转到登陆页面时可以使用focus方法 <input name="login_account"id="login_account"class=" ...

  2. Collection Of SVM Libraries By Language via datasciencecentral

    http://www.datasciencecentral.com/profiles/blogs/collection-of-svm-libraries-by-language Support vec ...

  3. LR参数化设置(转)

    LR学习笔记---参数设置 2010-10-20 14:58:55|  分类: 默认分类|举报|字号 订阅     LR在录制程序运行的过程中,VuGen(脚本生成器) 自动生成了包含录制过程中实际用 ...

  4. Stm32 SWD 下载 调试配置

    找到一篇比较好的 关于stm32  SWD模式 下载 调试 配置文章 整理如下:       我们比较常用的是Jlink下载器 ,这种下载器有一个缺点就是使用的Jtag 20PIN接口,太多的PIN会 ...

  5. 使用slf4j取代Apache Commons Logging

    假如你正在开发应用程序所调用的组件当中已经使用了 JCL(之前叫 Jakarta Commons Logging,JCL) 的,还有一些组建可能直接调用了 java.util.logging,这时你需 ...

  6. A Tour of Go Images

    Package image defines the Image interface: package image type Image interface { ColorModel() color.M ...

  7. hdoj 1863 畅通工程

    并查集+最小生成树 畅通工程 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)To ...

  8. Java数组的内存管理

    Java数组的内存管理 Java语言是典型的静态语言,因此Java的数组是静态的,即当数组被初始化之后,该数组的长度是不可变的.Java程序中的数组必须经初始化才能使用.所谓初始化,就是当数组对象的元 ...

  9. jquery完成带复选框的表格行高亮显示

    jquery完成带复选框的表格行高亮显示 通过jquery技术来操作表格是件简单的事,通过jquery的语法,可以很轻松的完成表格的隔行换色,悬浮高亮,在实际的应用中可能会出现表格中带复选框的,删除时 ...

  10. .NET设计模式(5):工厂方法模式(Factory Method)

    ):工厂方法模式(Factory Method)    工厂方法模式(Factory Method) --.NET设计模式系列之五 Terrylee,2004年1月2日 转载:http://terry ...