锁定网页内容的简单方法是什么?
例如,只需要用户名 foo
和密码 bar
,或者用户名 foo
,密码是今天的日期,取月份中的日期(比如10月16日的16),乘以2并重复两次,就是3232
?
For example, just requiring a user name foo
and password bar
, or user name foo
, and 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
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
选择一个难以猜测的密码并使用它。您的网络服务器可能有一种提供密码保护访问的方法,并且它几乎肯定会支持您喜欢的任意数量的用户。
请记住将密码视为简单的共享秘密。复杂的日期算术也是一个共享秘密,但它基本上不比密码更安全或更不安全。如果您选择合理的密码(即不可猜测,最好是随机的),那么您就不需要使用复杂的方案。
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.