How to make an online file encryptor with HTML and Javascript?

I’m trying to make a file encryptor for an online website with HTML and JavaScript. I have the file upload good and everything. But I need to make the actual encryptor and decryptor for the website, Is there any way I can achive this?