Skip to content

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

Notifications You must be signed in to change notification settings

yidas/crypto-sample-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages