How to make a file encrypt and decrypt? You can use base64_encode and base64_decode for file encrypt and decrypt.