Create user friendly codes

I’m learning how to generate random human friendly code, but I don’t (easily) guess. This will be used to give away prizes (think of unique discount codes). We should generate about 50 thousand. Are there standard methods / algorithms for this? I was thinking about using a GUID and applying CRC. It is a bad idea?

Using .netframework 3.5, if that matters.

+3
source share
5 answers

I used Base32 before for this kind of thing.

You just need an alphabet that avoids unpleasant characters like I, L, 1, 0, O, etc.

. , , Base32 , .

, , 4 .

2: - - 32.

+1

- , MD5 . :

: nr@yorkie 7012 ; md5words /home/nr/.profile  
overextend moonscape cucumbers outsmarting

40 Lua, , script, .


EDIT:

50 000 . :

for ((i=1; i<=50000; i++))
do 
  echo "this is my secret phrase $i" | md5words
done

:

Chisinau Phaethon customs Martina
commensurate freewill logical cambered
kamikazes Creighton Dobro Alonzo
medallion jesters goofy keystones
Anaxagoras martial Medina Hon's
acclimatized chirping Cleopatra mascaras
buoyant nuclear lumbering disagreements
dampens Philby cloak drollness

: 100 000 , 10 ^ 20 . 100 000 , , - , - 10 ^ 15. , , 0,3 , .

, - , , 10 000 , . , 10 ^ 4, - 1 100 .


UPDATE. 2011 xkcd.

+6

, :

  • , , . . Diceware.

  • , , , . , , .

  • , , , CRC (?), base64 . , , (.. "O", "o", "0" "Q" ).

  • , 5 , , . "A236re8ww1jkm" , "A236-re8wM-1jkz", . - ... , .

  • (.. , ), , .

+2

Java Pronouncable Passwords - , . , , .

, , , .

+2

Source: https://habr.com/ru/post/1705298/


All Articles