Key generator. See: websharks/s2member#206