forge($config = array())
The forge method allows you to manually instantiate a crypt instance.
Static | Yes | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
|||||||||
Returns | object - The instantiated crypt object. | |||||||||
Example |
|
The Crypt class allows encrypt or decrypt a string. The Crypt class is also used internally by for example the Fuel Sessions class.
It uses the encryption and hashing methods provided by PHPSecLib, so it's not dependent on external modules being available, such as mcrypt.
The Crypt class supports the use of multiple instances. This might prove useful if you require multiple encryption key sets.
You can use the same methods on an crypt instance as you would when you the static methods. For the method definition see the class usage page.
The forge method allows you to manually instantiate a crypt instance.
Static | Yes | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
|||||||||
Returns | object - The instantiated crypt object. | |||||||||
Example |
|
The instance method allows you load a named instance of the crypt class.
Static | Yes | ||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns | mixed - The named crypt instance or false if the instance does not exist. | ||||||
Example |
|
The static methods of the Crypt class will also use the default instance. Remember this if you alter the configuration of the default instance!