On 8/20/17 11:43 PM, bit-n...@hotmail.com wrote:during transit. So - there'll be TWO textboxes, one for the password, and one for the post itself - what would the coding for the form look like? It's only the password that has to be encrypted, not the post. I realise this is more of an HTML question,
I'm trying to set up a simple blogging system, where I have a form which will have a textbox which will allow me to post stuff. Now I want a password field on the form, so that random people cannot post. I would like this password to be ENCRYPTED
Thanks for your help.
A form post in pure HTML can not encrypt some data.
You could just submit the form via HTTPS, so the whole form is
encrypted. HTTPS does the encryption in the communication layer, and you
get the unencrypted results (so it is mostly transparent to your script)
A second option, that probably isn't really worth doing, is adding javascript to the form, and have that run on submit and have the
javascript encrypt the data. You would need to create a new
public/private key for each instance of the form sent out to do the encryption, and send the public key with the form. On reception, the
page would need to look up the public key to find the matching private
key, and use that to decode the password.
On Monday, August 21, 2017 at 6:02:18=E2=80=AFAM UTC+2, Richard Damon wrote= >:
On 8/20/17 11:43 PM, bit-n...@hotmail.com wrote:=20password to be ENCRYPTED during transit. So - there'll be TWO textboxes, o=
I'm trying to set up a simple blogging system, where I have a form whic= >h will have a textbox which will allow me to post stuff. Now I want a passw= >ord field on the form, so that random people cannot post. I would like this=
ne for the password, and one for the post itself - what would the coding fo= >r the form look like? It's only the password that has to be encrypted, not = >the post. I realise this is more of an HTML question, but really, it concer= >ns the whole thing, front end as well as back. I have no idea what HTTPS co= >ding on the backend looks like. How would I extract the unencrypted passwor= >d on the server side?=20
=20A form post in pure HTML can not encrypt some data.=20
=20
Thanks for your help.=20
=20
You could just submit the form via HTTPS, so the whole form is=20
encrypted. HTTPS does the encryption in the communication layer, and you= >=20
get the unencrypted results (so it is mostly transparent to your script)= >=20
=20
A second option, that probably isn't really worth doing, is adding=20
javascript to the form, and have that run on submit and have the=20
javascript encrypt the data. You would need to create a new=20
public/private key for each instance of the form sent out to do the=20
encryption, and send the public key with the form. On reception, the=20
page would need to look up the public key to find the matching private=20
key, and use that to decode the password.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 72:08:06 |
Calls: | 8,084 |
Calls today: | 2 |
Files: | 13,069 |
Messages: | 5,850,068 |