简体   繁体   English

如何使用javascript或jquery加密文件

[英]How to encrypt a file using javascript or jquery

Is it possible to encrypt a file using jquery or javascript? 是否可以使用jquery或javascript加密文件? For example. 例如。 If I have created a file using test.xml. 如果我已经使用test.xml创建了文件。 I want to encrypt a file test.xml. 我想加密文件test.xml。

If it is possible encrypted, so how can i decrypt it again? 如果可以加密,那么我该如何再次解密?

Regard 看待

I guess I didn't get what you want. 我想我没有得到你想要的。

If you want a encrypted tunnel on your app, you should use https 如果要在应用程序上使用加密隧道,则应使用https

If you want to write a program in javascript that encrypts a file in your server by the client side, the most you can do is get this file's content using ajax, encrypt (to text), and send back. 如果您想用JavaScript编写程序来通过客户端对服务器中的文件进行加密,那么您最能做的就是使用ajax获取此文件的内容,进行加密(文本化)并发送回去。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM