加密通过django中的表单提交的数据

时间:2022-08-01 18:28:11

I have a form in django that stores some info in a database. I want the data submitted through the form to be encrypted when it is submitted (before it goes into the table so that it appears encrypted as it is being sent) and then to be able to decrypt it when retrieving it from the table. Is there a way to achieve this?

我在django中有一个表单,它将一些信息存储在数据库中。我希望通过表单提交的数据在提交时加密(在它进入表之前使其在发送时显示为加密),然后在从表中检索时能够对其进行解密。有没有办法实现这个目标?

3 个解决方案

#1


1  

Have a look at this question. Your options include SSL or (worse) some javascript-based encryption.

看看这个问题。您的选项包括SSL或(更糟)一些基于JavaScript的加密。

#2


0  

you can look at this solution http://djangosnippets.org/snippets/2489/

你可以看看这个解决方案http://djangosnippets.org/snippets/2489/

#3


0  

Have a look at http://djangosnippets.org/snippets/2489/ for a start.

看看http://djangosnippets.org/snippets/2489/开始吧。

#1


1  

Have a look at this question. Your options include SSL or (worse) some javascript-based encryption.

看看这个问题。您的选项包括SSL或(更糟)一些基于JavaScript的加密。

#2


0  

you can look at this solution http://djangosnippets.org/snippets/2489/

你可以看看这个解决方案http://djangosnippets.org/snippets/2489/

#3


0  

Have a look at http://djangosnippets.org/snippets/2489/ for a start.

看看http://djangosnippets.org/snippets/2489/开始吧。