Encodes & decodes data using RC4 encryption. Handy for link obfuscation
Encode it.
This plugin encrypts and decrypts data using RC4 encryption. This plugin is for use primarily as an obfuscation tool for use in links. This should not necessarily be considered strong encryption, but makes the discovery of entry ids and other strings more difficult.
Categories:
ExpressionEngine,
Plugin
encode
parameter data: the data you want to encode
parameter salt: a randomizing string to encode your data with
example: {exp:bn_linkencode:encode data="blahblahblah" salt="whatevs"}
decode
parameter data: the data you'd like to decode
parameter salt: the salt you used to encrypt the data
example: {exp:bn_linkencode:decode data="{segment_3}" salt="whatevs"}
Encrypt a members only link with a "salt" string made up of a string known only to you + a logged in member's username. This way the members only link can only be decrypted & accessed when a member is logged in, and their username is output in the template.
If you are using this as a method to obfuscate download links, you should problably store your downloads above the root level of your website so they can't be accessed directly, and the link should go to a page that forces this file to download using PHP (by the way, we also have a plugin available that forces downloading of files above the root level.)