2017 © Pedro Peláez
 

library php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

image

snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  • Monday, April 3, 2017
  • by Snawoot
  • Repository
  • 6 Watchers
  • 22 Stars
  • 45 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 7 % Grown

The README.md

php-storageless-sessions Build Status

Sessions handler which stores session data in HMAC-signed and encrypted cookies., (*1)


:heart: :heart: :heart:, (*2)

You can say thanks to the author by donations to these wallets:, (*3)

  • ETH: 0xB71250010e8beC90C5f9ddF408251eBA9dD7320e
  • BTC:
    • Legacy: 1N89PRvG1CSsUk9sxKwBwudN6TjTPQ1N8a
    • Segwit: bc1qc0hcyxc000qf0ketv4r44ld7dlgmmu73rtlntw

Requirements

  • PHP 5.4.0 or newer
  • OpenSSL extension (built-in by default)
  • Hash extension (built-in by default)
  • Enabled output buffering (output_buffering=1 or output_buffering=On in php.ini)

Usage

Plain PHP

<?php

$secret = "reallylongsecretplease";
$handler = new VladislavYarmak\StoragelessSession\CryptoCookieSessionHandler($secret);

session_set_save_handler($handler, true);
session_start();

$_SESSION["key"] = "value";

Symfony

framework:
    session:
        handler_id:  session.handler.cookie

services:
    session.handler.cookie:
        class:     VladislavYarmak\StoragelessSession\CryptoCookieSessionHandler
        public:    true
        arguments:    ['reallylongsecretplease']

Handler constructor parameters

CryptoCookieSessionHandler($secret, $expire = 2592000, $digest_algo = "sha256", $cipher_algo = "aes-256-cbc", $cipher_keylen = 32)
  • $secret - secret passphrase used for HMAC signature and encryption
  • $expire - expiration time of HMAC signature
  • $digest_algo - hash algorithm used for key derivation and cookie signature. See hash_algos() for all available message digest algorithms.
  • $cipher_algo - cipher algorithm used for session contents encryption. See openssl_get_cipher_methods() for all available ciphers.
  • $cipher_keylen - proper key length for specified cipher algorithm, used for encryption key derivation

The Versions

03/04 2017

dev-master

9999999-dev https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • ext-hash *
  • ext-openssl *
  • php >=5.4.0

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies

03/04 2017

dev-devel

dev-devel https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • ext-hash *
  • ext-openssl *
  • php >=5.4.0

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies

03/04 2017

1.4.2

1.4.2.0 https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-hash *
  • ext-openssl *

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies

02/04 2017

1.4.1

1.4.1.0 https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-hash *
  • ext-openssl *

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies

02/04 2017

1.4.0

1.4.0.0 https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-hash *
  • ext-openssl *

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies

02/04 2017

1.3.2

1.3.2.0 https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-hash *
  • ext-openssl *

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies

01/04 2017

1.3.1

1.3.1.0 https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • php >=5.6.0
  • ext-hash *
  • ext-openssl *

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies

01/04 2017

1.3.0

1.3.0.0 https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • php >=5.6.0
  • ext-hash *
  • ext-openssl *

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies

01/04 2017

1.2.0

1.2.0.0 https://github.com/Snawoot/php-storageless-sessions

Storageless sessions with encrypted and HMAC-signed cookies

  Sources   Download

MIT

The Requires

  • php >=5.6.0
  • ext-hash *
  • ext-openssl *

 

The Development Requires

by Vladislav Yarmak

hmac sessions cookies encrypted cookies signed cookies