Simple codeigniter integration of Hashids
- Copy helpers/hashids_helper.php to application/helpers folder
- Copy library/Hashids.php to application/library folder
- Copy config/hashids.php to application/config folder
- Make required changes in config/hashids.php
$this->load->helper('hashids');
Encrypt: <?=hashids_encrypt(1234)?>
Decrypt: <?=hashids_decrypt("1lj")?>
Custom Encrypt: <?=hashids_encrypt(1234, 'alternate config salt', 10)?>
Custom Encrypt: <?=hashids_decrypt('pjxalngQJ3', 'alternate config salt', 10)?>