yidas / crypto-sample-php

PHP sample code for symmetric and asymmetric cryptography with encryption and decryption

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crypto Sample for PHP

PHP sample code for symmetric and asymmetric cryptography with encryption and decryption

FEATURES

It's a simple implementation of handing encryption and decryption with AES symmetric-key algorithm between two side, PHP server and Javascript client.


INSTALLATION

Download repository and run Composer install in your Web directory:

$ git clone https://github.com/yidas/crypto-sample-php;
$ cd crypto-sample-php;
$ composer install;

CONCEPTION

Advanced Encryption Standard (AES), a subset of the Rijndael cipher, which is a symmetric-key algorithm, meaning the same key is used for both encrypting and decrypting the data.

Block Cipher Mode of Operation

  • ECB - Same cipher text with same plain text. No use of IV.

  • CBC - Different cipher text with same plain text. Using IV. (The most commonly used mode of operation)


REFERENCE

CryptoJS Github

CryptoJS Google Documentation

CryptoJS Library CDN

About

PHP sample code for symmetric and asymmetric cryptography with encryption and decryption


Languages

Language:PHP 100.0%