Encrypt URL and reduce PHP encryption size

Asked

Viewed 108 times

-2

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

when I’m gonna do this encryption

$mp4 = Base64($link);

it encrypts that url

https://server:8080/f/l/d/video-Dub.mp4

outworking

aHR0cHM6Ly9zZXJ2aWRvcjo4MDgwL2YvbC9kL3ZpZGVvLWR1Yi5tcDQ=

I wanted to reduce it to less than this size

aHR0cHM6Ly9zZX

1 answer

2


Your question contains some errors. First that Base64 is not a cryptographic function, it only encodes its contents in 64 characters, there is not necessarily a size reduction. Second as it is only 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).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.