Phonetically Memorable Password Generation Algorithms

后端 未结 17 2416
生来不讨喜
生来不讨喜 2021-01-30 00:05

Background

While at the Gym the other day, I was working with my combination lock, and realized something that would be useful to me as a programmer. To wit, my combin

17条回答
  •  执笔经年
    2021-01-30 00:53

    edit: After answering, I realized that this is in no way phonetically memorable. Leaving the answer anyway b/c I find it interesting. /edit

    Old thread, I know... but it's worth a shot.

    1) I'd probably build the largest dictionary you can ammass. Arrange them into buckets by part of speech.

    2)Then, build a grammar that can make several types of sentences. "Type" of sentence is determined by permutations of parts of speech.

    3)Randomly (or as close to random as possible), pick a type of sentence. What is returned is a pattern with placeholders for parts of speech (n-v-n would be noun-verb-noun)

    3)Pick words at random in each part of speech bucket to stand in for the placeholders. Fill them in. (The example above might become something like car-ate-bicycle.)

    4)randomly scan each character deciding whether or not you want to replace it with either a similar-sounding character (or set of characters), or a look-alike. This is the hardest step of the problem.

    5) resultant password would be something like kaR@tebyCICle

    6) laugh at humorous results like the above that look like "karate bicycle"

提交回复
热议问题