How to use encryption, decryption and hashing algorithms in laravel applications.
avinash wrote another tutorial about how to encryption, decryption and hashing algorithms in Laravel applications.
Encryption, Decryption and Hashing in laravel applications
Hello readers, I am back with another tutorial, here we will see how to use cryptography – cryptographic functions like encryption,decryption for handling and managing sensitive data and hashing algorithms for storing and handling passwords in laravel applications.
We all know that when there is some sensitive data to be handled in a application we need to use some cryptography like encryption, decryption and for storing passwords, cryptography like hashing is used to handle them efficiently.
Encryption and Decryption Cryptography
By default laravel uses AES-256-CBC to encrypt all the values, it means that it uses Advanced Encryption Standard encryption with 256 bit key size and a CBC cipher mode. However, we can also set the cipher and mode using the following functions,
Crypt::setMode('ctr');
Crypt::setCipher($cipher);
Encryption and decryption
Crypt::encrypt($value_to_be_encrypted);
Crypt::decrypt($value_to_be_decrypted);
Complete detailed post : http://justlaravel.com/cryptography-encryption-hashing/?utm_source=learninglaravel.net
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5 Laravel 5.1 Intermediate Laravel 5.2