我怎样才能让它使用 javascript 密码保护 csv 文件 [英] How can i make it csv file password protected using javascript

查看:31
本文介绍了我怎样才能让它使用 javascript 密码保护 csv 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

html 表数据导出到 csv 文件,它正在发生,但我想使用 javascript 使 csv 文件密码保护.这可能吗?或以其他方式做同样的事情.提前致谢

html table data exporting into csv file ,it's happening but i want to make csv file password protected using javascript .is it possible ? or another way to do same thing .Thanks in Advance

推荐答案

从表面上看,CSV 文件只是一种数据交换格式,其中字段以逗号分隔,每条记录都占一行.

On the surface a CSV file is just a data exchange format, where fields are separated by commas and each record goes on a single line.

逗号分隔值标准

该规范本身不涉及密码保护.

This specification itself wouldn’t deal with password protection.

但是你能做一些像压缩 csv.txt 之类的事情吗?那么在解压前需要输入密码.

But can you do something like zip the csv. Then that would require a password before uncompressing.

密码保护 Zip 文件 SO

在那个链接中,有人叫 exec 来压缩一个有密码保护的文件.

In that link someone called exec to zip a file with password protection.

我不确切知道您打算完成什么的详细信息,但基本上您可以随心所欲地打乱 CSV 并使其不可读而无需解密,但由于这不是标准的一部分,因此任何人都可以获取该文件不知道该怎么办.如果您同时控制加密和解密,则不需要 zip.

I do not know exactly the details of what you are intending to accomplish, but basically you can scramble a CSV all you want and make it unreadable without decryption, but since that isn't part of the standard, anyone getting that file wouldn't know what to do with it. If you control both the encryption and decryption, then you don't need zip.

您可以只使用加密库 Javascript AES 加密

这篇关于我怎样才能让它使用 javascript 密码保护 csv 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆