Skip to content

Commit 73c0384

Browse files
committed
Updated Hashids to version 1.0.0
1 parent 5aa195d commit 73c0384

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,24 @@ This will publish Hashids' config to ``app/config/packages/torann/hashids/``.
4343

4444
Once you've followed all the steps and completed the installation you can use Hashids.
4545

46-
### Encrypting
46+
### Encodeing
4747

48-
You can simply encrypt on id:
48+
You can simply encode a single id:
4949

5050
```php
51-
Hashids::encrypt(1); // Returns Ri7Bi
51+
Hashids::encode(1); // Returns Ri7Bi
5252
```
5353

5454
or multiple..
5555

5656
```php
57-
Hashids::encrypt(1, 21, 12, 12, 666); // Returns MMtaUpSGhdA
57+
Hashids::encode(1, 21, 12, 12, 666); // Returns MMtaUpSGhdA
5858
```
5959

60-
### Decrypting
60+
### Decodeing
6161

6262
```php
63-
Hashids::decrypt(Ri7Bi);
63+
Hashids::decode(Ri7Bi);
6464

6565
// Returns
6666
array (size=1)
@@ -70,7 +70,7 @@ array (size=1)
7070
or multiple..
7171

7272
```php
73-
Hashids::decrypt(MMtaUpSGhdA);
73+
Hashids::decode(MMtaUpSGhdA);
7474

7575
// Returns
7676
array (size=5)
@@ -81,4 +81,20 @@ array (size=5)
8181
4 => int 666
8282
```
8383

84+
## Changelog
85+
86+
**1.0.0**
87+
88+
- Several public functions are renamed to be more appropriate:
89+
- Function `encrypt()` changed to `encode()`
90+
- Function `decrypt()` changed to `decode()`
91+
- Function `encryptHex()` changed to `encodeHex()`
92+
- Function `decryptHex()` changed to `decodeHex()`
93+
94+
Hashids was designed to encode integers, primary ids at most. Hashids is the wrong algorithm to encrypt sensitive data. So to encourage more appropriate use, `encrypt/decrypt` is being "downgraded" to `encode/decode`.
95+
96+
- Version tag added: `1.0`
97+
- `README.md` updated
98+
99+
84100
All credit for Hashids goes to Ivan Akimov (@ivanakimov), thanks to for making it!

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"require": {
1313
"php": ">=5.3.0",
1414
"illuminate/support": "~4.1",
15-
"hashids/hashids": "0.3.1"
15+
"hashids/hashids": "1.0.0"
1616
},
1717
"autoload": {
1818
"psr-0": {

0 commit comments

Comments
 (0)