2017 © Pedro Peláez
 

library lib-encryption

Encryption library of the Ride framework

image

ride/lib-encryption

Encryption library of the Ride framework

  • Wednesday, April 4, 2018
  • by ride-user
  • Repository
  • 7 Watchers
  • 0 Stars
  • 3,185 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 2 % Grown

The README.md

Ride: Encryption Library

Encryption library of the PHP Ride framework., (*1)

What's In This Library

Cipher

The Cipher interface is used to implement a cipher to encrypt and decrypt data using an encryption key., (*2)

Available implementations:, (*3)

  • ride\library\encryption\cipher\ChainCipher: Chain of ciphers with an certain amount of iterations
  • ride\library\encryption\cipher\GenericCipher: Generic implementation
  • ride\library\encryption\cipher\SimpleCipher: Simple implementation with relative short length of encrypted data, not secure for sensitive data

Hash

The Hash interface is used to implement cryptographic hash algorithms. These are methods which take an arbitrary block of data and return a fixed-size bit string, (*4)

Available implementations:, (*5)

  • ride\library\encryption\hash\GenericHash: Use installed hash functions, defaults to SHA256
  • ride\library\encryption\hash\PlainHash: For testing purposes

Code Sample

Check this code sample to see the possibilities of this library:, (*6)

<?php

use ride\library\encryption\cipher\GenericCipher;
use ride\library\encryption\exception\EncryptionException;
use ride\library\encryption\hash\GenericHash;

// cipher to encrypt and decrypt data
try {
    $cipher = new GenericCiper();
    $data = "Top secret mission";

    // if you don't have a secret key, you can generate one
    $key = $cipher->generateKey();

    $encrypted = $cipher->encrypt($data, $key);
    $decrypted = $cipher->decrypt($encrypted, $key); 
} catch (EncryptionException $exception) {
    // something's up!
}

// hash to generate a code of fixed size, good for passwords
$hash = new GenericHash();
$data = $hash->hash($data); 

Installation

You can use Composer to install this library., (*7)

composer require ride/lib-encryption

The Versions

04/04 2018

dev-develop

dev-develop

Encryption library of the Ride framework

  Sources   Download

MIT

by Joris Vandeweerd

04/04 2018

dev-master

9999999-dev

Encryption library of the Ride framework

  Sources   Download

MIT

by Joris Vandeweerd

04/04 2018

1.1.0

1.1.0.0

Encryption library of the Ride framework

  Sources   Download

MIT

by Joris Vandeweerd

31/03 2017

1.0.2

1.0.2.0

Encryption library of the Ride framework

  Sources   Download

MIT

by Joris Vandeweerd

08/09 2016

1.0.1

1.0.1.0

Encryption library of the Ride framework

  Sources   Download

MIT

by Joris Vandeweerd

21/06 2016

1.0.0

1.0.0.0

Encryption library of the Ride framework

  Sources   Download

MIT

by Joris Vandeweerd

17/07 2015

0.2.1

0.2.1.0

Encryption library of the Ride framework

  Sources   Download

MIT

by Joris Vandeweerd

11/05 2015

0.2.0

0.2.0.0

Encryption library of the Ride framework

  Sources   Download

MIT

by Joris Vandeweerd

28/11 2013

0.1.0

0.1.0.0

Encryption library of the Pallo framework

  Sources   Download

MIT

by Joris Vandeweerd