Laracasts series.
Think about how many hours each week you spend within your editor. Doesn't it make sense to unlock every inch of its capabilities? I certainly subscribe to that idea! Why don't you come along, and I'll teach you everything I know about PHPStorm.
This tutorial will show you how to encrypt arbitrarily large messages with asymmetric keys and a PHP library called phpseclib.
Most of us understand the need to encrypt sensitive data before transmitting it. Encryption is the process of translating plaintext (i.e. normal data) into ciphertext (i.e. secret data). During encryption, plaintext information is translated to ciphertext using a key and an algorithm. To read the data, the ciphertext must be decrypted (i.e. translated back to plaintext) using a key and an algorithm.
An encryption algorithm is a series of mathematical operations applied to the numerical value(s) of the key and the numerical values of the characters in a string of plaintext. The results are the ciphertext. The larger the key, the more secure the ciphertext.
A core problem to be solved with any encryption algorithm is key distribution. How do you transmit keys to those who need them in order to establish secure communication?
The solution to the problem depends on the nature of the keys and algorithms.
There are two basic types of encryption algorithms:
Read the full article
First, if you don’t have it installed already, let’s install Redis:
sudo apt-get install redis-server
After we get Redis installed (and/or verified that it was installed), we can install the PHP module for Redis:
sudo apt-get install php5-redis
After the module is done installing, you will want to restart your webserver and/or process manager (php-fpm, spawncgi, et cetera). Once you’ve restarted, you can check phpinfo() for a new section labeled Redis.
In addition to the Redis interface, you will also gain the ability to use Redis as a save handler. For more information you can check out my post on using Redis as a PHP Session Handler.
Tested on Ubuntu 14.04 LTS
The sessionStorage object has five methods:
There is also a single property, length, which indicates how many key-value pairs are currently stored in sessionStorage. Some example usage:
//save a value
sessionStorage.setItem("name", "Nicholas");
//retrieve item
var name = sessionStorage.getItem("name");
//get the key name for the first item
var key = sessionStorage.key(0);
//remove the key
sessionStorage.removeItem(key);
//check how many key-value pairs are present
var count = sessionStorage.length;
Additionally, proper implementations allow you to read, write, and remove values from sessionStorage as if it were a regular object. For example:
//save a value
sessionStorage.name = "Nicholas";
//retrieve item
var name = sessionStorage.name;
//remove the key
delete sessionStorage.name;
Topics include: