有关注册密钥/访问代码格式最佳实践的参考
我正在开发一个在线网站,大学书店将出售该网站的访问权限。 学生将在书店购买一张带有访问代码的卡,然后他们可以使用该代码在我们的网站上在线注册。
我想让代码尽可能对用户友好。 我个人讨厌注册一个产品并且必须输入注册码 5 次,因为它含糊不清。
谁能给我指出一些描述设计代码本身格式的最佳实践的资源? 显而易见的事情浮现在脑海中——不要使用零或字母 O,不要区分大小写,包括某种校验和。 我不想在这里发挥创造力,我需要一个解决必须多次解决的问题的方法。
I am developing an online site to which access will be sold at college bookstores. Students will purchase a card at the bookstore with an access code that they may then use to register online at our site.
I want to make the code as user friendly as possible. I personally hate registering for a product and having to type in a registration key 5 times because it's ambiguous.
Can anyone point me to resources describing best practices for designing the format of the code itself? Obvious things spring to mind-- don't use zeroes or the letter O, don't make it case sensitive, include some kind of checksum. I don't want to be creative here, I need a recipe for what must be a problem solved many times.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这实际上取决于您需要多少安全性。 我想到了一些想法。
如果你想要一些非常简单的东西,你可以生成模拟的信用卡号码; 学生熟练使用这些四位数组合,可以用 Luhn 算法进行检查。
如果你想要更强大的东西,你可以生成一个 GUID,并将其用作代码。
如果您的网站可以发送电子邮件,您可以询问学生的电子邮件地址,并向他们发送质询/回复电子邮件。 那么你根本不需要代码。 他们的电子邮件地址就是代码。
It really depends on how much security you need. A few ideas come to mind.
If you want something really simple you could generate simulated credit card numbers; students are adept at using these four-digit combinations, and they can be checked with a Luhn algorithm.
If you want something a little stronger you could generate a GUID, and use that as the code.
If your website can send emails you can ask the student for their email address, and send them a challenge/response email. Then you don't need codes at all. Their email address is the code.
Joel Spolsky 在最近的 StackOverflow 播客中对解决这个问题提出了一些很好的见解。 我相信这一集是第 49 集,您应该下载播客或在 https: //stackoverflow.fogbugz.com/default.asp?W4
处理混合在一个键中的 0(数字)和 O(字母)确实很烦人,因为某些字体很难区分两者。
其他可用性概念(例如三个一组比单个数字更容易处理和记住)是值得注意的。 例如,345-829-817-432 而不是 345829817432。
顺便说一句,345-829-817-432 为您提供 12^10 种排列,甚至还有更小的数字 345-829 -817 为您提供 9^10 种排列,根据您的情况,这可能会给您足够的强度。
tschüss,
bn
Joel Spolsky had some good insights to solving this problem in one of the recent StackOverflow podcasts. I believe the episode was #49, you should download podcasts or checkout the transcripts at https://stackoverflow.fogbugz.com/default.asp?W4
Dealing with 0 (number) and O (letter) mixed in a key is really annoying as some fonts make it hard to distinguish the two.
Other usability concepts such as groups of three being easier to deal with and remember then a single number are good to be aware of. For example, 345-829-817-432 instead of 345829817432.
By the way, 345-829-817-432 gives you 12^10 permutations, and even the smaller number 345-829-817 gives you 9^10 permutations which may give you enough strength depending on your situation.
tschüss,
bn