Encrypt URL and reduce size of PHP encryption

-2

I'm making a basic system where I pass information like, title, url video, image ... I'm creating this way because I do not want to use a database.

When I'm going to do this encryption

$ mp4 = base64 ($ link);

It encrypts this url

link

result

aHR0cHM6Ly9zZXJ2aWRvcjo4MDgwL2YvbC9kL3ZpZGVvLWR1Yi5tcDQ=

I wanted to reduce this to stay that much smaller

aHR0cHM6Ly9zZX
    
asked by anonymous 27.11.2018 / 00:48

1 answer

1

Your question contains some errors. First that base64 is not a cryptographic function, it only encodes its content in 64 characters, there is not necessarily a reduction in size. Second as it is just an encoding there is no way to decrease its size and continue with its original content. You should look for something to compress like GZip or LZstrig (js).

    
27.11.2018 / 01:00