开发者

What is a simple way to lock the content of a webpage?

开发者 https://www.devze.com 2023-01-22 14:57 出处:网络
For example, just requiring a user name foo and password bar, or user name foo, a开发者_高级运维nd the password is today\'s date, take day of month (such as the 16 in Oct 16), multiply by 2 and repeat

For example, just requiring a user name foo and password bar, or user name foo, a开发者_高级运维nd the password is today's date, take day of month (such as the 16 in Oct 16), multiply by 2 and repeat twice, which is 3232?


Pick a hard-to-guess password and just use that. Your web server probably has a method for providing password-protected access and it will almost certainly support as many users as you like.

Remember to think of passwords as simply a shared secret. Your complicated date arithmetic is also a shared secret, but it is fundamentally no more or less secure than a password. If you choose sensible passwords (i.e. not guessable, ideally random) then you don't need to muck around with convoluted schemes.

0

精彩评论

暂无评论...
验证码 换一张
取 消