Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 1ed7d7c

Browse files
committed
added required packages to composer
added security notes
1 parent 229053d commit 1ed7d7c

5 files changed

Lines changed: 16 additions & 6 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.idea
1+
.idea
2+
vendor
3+
composer.lock

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
A tool to AES encrypt/decrypt data in javascript and/or PHP. You can use it for PHP only, for Javascript only or mix it together.
44

5-
It uses default aes-256-cbc implementation with random salts and initialization vector.
5+
It uses default `aes-256-cbc` implementation with random salts and random initialization vector. This library does not support other ciphers or modes.
66

77
## Features
88
* Encrypt any value in Javascript (objects/array/etc...) - Everything that can be passed to `JSON.stringify`
99
* Encrypt any value in PHP (object/array/etc...) - Everything that can be passed to `json_encode`
1010
* Decrypt in PHP/Javascript, doesn't matter where you have encrypted the values
1111

12+
1213
## How to use
1314
###### PHP | See [dist/example-php.php](https://github.com/brainfoolong/cryptojs-aes-php/blob/master/dist/example-php.php)
1415
You need the file `src/CryptoJsAes.php`
@@ -65,6 +66,11 @@ You need the file `dist/cryptojs-aes.min.js` and `dist/cryptojs-aes-format.js`
6566
* 7.x
6667
* 5.x (head to the [legacy branch](https://github.com/brainfoolong/cryptojs-aes-php/tree/legacy))
6768

69+
## Security Notes
70+
Since the time that this library has been created, encyption technologies has been evolved. Using AES-256-CBC encryption is still good and safe but there are already better alternatives than this library or CryptoJS. If you require really high security than you should invest more time for what is suitable for you.
71+
72+
Also, there's a good article about PHP issues/info related to this library: https://stackoverflow.com/questions/16600708/how-do-you-encrypt-and-decrypt-a-php-string/30159120#30159120
73+
6874
## Upgrade Info
6975
Breaking changes: This library has changed to PSR-4 namespaces as of 7. April 2020. Also parameters and behaviour has changed to the previous version. For the old version of this library head to the [legacy branch](https://github.com/brainfoolong/cryptojs-aes-php/tree/legacy).
7076

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
"Nullix\\CryptoJsAes\\": "src/"
2323
}
2424
},
25-
"version": "2.1.0",
25+
"version": "2.1.1",
2626
"require": {
27-
"php": ">=7.0.0"
27+
"php": ">=7.0.0",
28+
"ext-openssl": "*",
29+
"ext-json": "*"
2830
}
2931
}

dist/cryptojs-aes-format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* AES JSON formatter for CryptoJS
33
* @link https://github.com/brainfoolong/cryptojs-aes-php
4-
* @version 2.1.0
4+
* @version 2.1.1
55
*/
66

77
var CryptoJSAesJson = {

src/CryptoJsAes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* PHP 7.x and later supported
88
* If you need PHP 5.x support, goto the legacy branch https://github.com/brainfoolong/cryptojs-aes-php/tree/legacy
99
* @link https://github.com/brainfoolong/cryptojs-aes-php
10-
* @version 2.1.0
10+
* @version 2.1.1
1111
*/
1212
class CryptoJsAes
1313
{

0 commit comments

Comments
 (0)