2017 © Pedro Peláez
 

library cookie

Coercive Security Cookie

image

coercive/cookie

Coercive Security Cookie

  • Friday, March 30, 2018
  • by Coercive
  • Repository
  • 1 Watchers
  • 1 Stars
  • 719 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 15 % Grown

The README.md

Coercive Security Cookie

Cookie allows you to create / read / delete normal or encrypted cookies., (*1)

Get

composer require coercive/cookie

Usage

use Coercive\Security\Cookie\Cookie;

# No need to reload the document.
# The Cookie class creates and deletes cookies also in the super global $_COOKIE.

# Instantiate and set your options
$cookie = new Cookie;
$cookie->setPath('/');
$cookie->setDomain('.domain.extension');
// etc...

# Option : anonymise -> cookie names are now sha1 + salt
$cookie->anonymize(true, 'abcd1234');
# You can prefix anonymised cookie : Hello_*************
$cookie->anonymize(true, 'abcd1234', 'Hello_');

# Plain cookie
$cookie->set('MyCookie', 'Hey ! This is an example cookie !', time() + 600);
$var = $cookie->get('MyCookie');

# Crypted cookie
$cookie = new Cookie('My Password');
$cookie->setSafe('MyCookie', 'Hey ! This is an example cookie !', time() + 600);
$var = $cookie->getSafe('MyCookie');

# Delete cookie
$cookie->delete('MyCookie');

The Versions

30/03 2018

dev-master

9999999-dev http://coercive.fr

Coercive Security Cookie

  Sources   Download

MIT GNU

The Requires

 

30/03 2018

1.1.0

1.1.0.0 http://coercive.fr

Coercive Security Cookie

  Sources   Download

MIT

The Requires

 

07/02 2018

1.0.1

1.0.1.0 http://coercive.fr

Coercive Security Cookie

  Sources   Download

MIT

The Requires

 

15/07 2016

1.0.0

1.0.0.0 http://coercive.fr

Coercive Security Cookie

  Sources   Download

GNU

The Requires