Last active
August 29, 2015 14:13
-
-
Save martindilling/e858a99b3d39ffab3776 to your computer and use it in GitHub Desktop.
Generate a secure random password, that has a better change of being remembered than a completely random string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Martin Dilling-Hansen <[email protected]> | |
* @date 2015-01-12 | |
*/ | |
interface hasWords | |
{ | |
/** | |
* Get an flat array of words. | |
* | |
* @return array | |
*/ | |
function getWords(); | |
} | |
/** | |
* @author Martin Dilling-Hansen <[email protected]> | |
* @date 2015-01-12 | |
*/ | |
class Word | |
{ | |
/** | |
* @var HasWords | |
*/ | |
private $wordGroup; | |
public function __construct(HasWords $wordGroup) | |
{ | |
$this->wordGroup = $wordGroup; | |
} | |
/** | |
* Get a random word when cast to string. | |
* | |
* @return string | |
*/ | |
public function __toString() | |
{ | |
return $this->random($this->wordGroup); | |
} | |
/** | |
* Get a random word. | |
* | |
* @param \Naboo\Utility\Generators\HasWords $wordGroup | |
* | |
* @return string | |
*/ | |
protected function random(HasWords $wordGroup) | |
{ | |
$words = $wordGroup->getWords(); | |
return $words[array_rand($words)]; | |
} | |
} | |
/** | |
* @author Martin Dilling-Hansen <[email protected]> | |
* @date 2015-01-12 | |
*/ | |
class Verbs implements hasWords | |
{ | |
/** | |
* Get an flat array of words. | |
* | |
* @return array | |
*/ | |
public function getWords() | |
{ | |
return [ | |
'abide', 'accelerate', 'accept', 'accomplish', 'achieve', 'acquire', 'acted', 'activate', 'adapt', | |
'address', 'administer', 'admire', 'admit', 'adopt', 'advise', 'afford', 'agree', 'alert', 'alight', | |
'allow', 'altered', 'amuse', 'analyze', 'announce', 'annoy', 'answer', 'anticipate', 'apologize', 'appear', | |
'applaud', 'applied', 'appoint', 'appraise', 'appreciate', 'approve', 'arbitrate', 'argue', 'arise', | |
'arrange', 'arrest', 'arrive', 'ascertain', 'assemble', 'assess', 'assist', 'assure', 'attach', 'attack', | |
'attain', 'attempt', 'attend', 'attract', 'audited', 'avoid', 'awake', 'back', 'bake', 'balance', 'bang', | |
'bare', 'bathe', 'battle', 'beam', 'bear', 'beat', 'become', 'begin', 'behave', 'behold', 'belong', 'bend', | |
'beset', 'bind', 'bite', 'bleach', 'bleed', 'bless', 'blind', 'blink', 'blot', 'blow', 'blush', 'boast', | |
'boil', 'bolt', 'bomb', 'book', 'bore', 'borrow', 'bounce', 'brake', 'branch', 'break', 'breathe', 'breed', | |
'brief', 'bring', 'broadcast', 'bruise', 'brush', 'bubble', 'budget', 'build', 'bump', 'burn', 'burst', | |
'bury', 'bust', 'buzz', 'calculate', 'call', 'camp', 'care', 'carry', 'carve', 'cast', 'catalog', 'catch', | |
'cause', 'challenge', 'change', 'charge', 'chart', 'chase', 'cheat', 'check', 'cheer', 'chew', 'choke', | |
'choose', 'chop', 'claim', 'clap', 'clarify', 'classify', 'clean', 'clear', 'cling', 'clip', 'close', | |
'clothe', 'coach', 'coil', 'collect', 'color', 'comb', 'come', 'command', 'communicate', 'compare', | |
'compete', 'compile', 'complain', 'complete', 'compose', 'compute', 'conceive', 'concentrate', | |
'conceptualize', 'concern', 'conclude', 'conduct', 'confess', 'confront', 'confuse', 'connect', 'conserve', | |
'consider', 'consist', 'consolidate', 'construct', 'consult', 'contain', 'continue', 'contract', 'control', | |
'convert', 'coordinate', 'copy', 'correct', 'correlate', 'cost', 'cough', 'counsel', 'count', 'cover', | |
'crack', 'crash', 'crawl', 'create', 'creep', 'critique', 'cross', 'crush', 'cure', 'curl', 'curve', | |
'cycle', 'damage', 'dance', 'dare', 'deal', 'decay', 'deceive', 'decide', 'decorate', 'define', 'delay', | |
'delegate', 'delight', 'deliver', 'demonstrate', 'depend', 'describe', 'desert', 'deserve', 'design', | |
'destroy', 'detail', 'detect', 'determine', 'develop', 'devise', 'diagnose', 'direct', 'disagree', | |
'disappear', 'disapprove', 'disarm', 'discover', 'dislike', 'dispense', 'display', 'disprove', 'dissect', | |
'distribute', 'dive', 'divert', 'divide', 'double', 'doubt', 'draft', 'drag', 'drain', 'dramatize', 'draw', | |
'dream', 'dress', 'drink', 'drip', 'drive', 'drop', 'drown', 'drum', 'dust', 'dwell', 'earn', 'edited', | |
'educate', 'eliminate', 'embarrass', 'employ', 'empty', 'enacted', 'encourage', 'endure', 'enforce', | |
'engineer', 'enhance', 'enjoy', 'enlist', 'ensure', 'enter', 'entertain', 'escape', 'establish', 'estimate', | |
'evaluate', 'examine', 'exceed', 'excite', 'excuse', 'execute', 'exercise', 'exhibit', 'exist', 'expand', | |
'expect', 'expedite', 'experiment', 'explain', 'explode', 'express', 'extend', 'extract', 'face', | |
'facilitate', 'fade', 'fail', 'fancy', 'fasten', 'fear', 'feed', 'feel', 'fence', 'fetch', 'fight', 'file', | |
'fill', 'film', 'finalize', 'finance', 'find', 'fire', 'flap', 'flash', 'flee', 'fling', 'float', 'flood', | |
'flow', 'flower', 'fold', 'follow', 'fool', 'forbid', 'force', 'forecast', 'forego', 'foresee', 'foretell', | |
'forget', 'forgive', 'form', 'formulate', 'forsake', 'frame', 'freeze', 'frighten', 'gather', 'gaze', | |
'generate', 'give', 'glow', 'glue', 'govern', 'grab', 'graduate', 'grate', 'grease', 'greet', 'grin', | |
'grind', 'grip', 'groan', 'grow', 'guarantee', 'guard', 'guess', 'guide', 'hammer', 'hand', 'handle', | |
'handwrite', 'hang', 'happen', 'harass', 'harm', 'hate', 'haunt', 'head', 'heal', 'heap', 'hear', 'heat', | |
'help', 'hide', 'hold', 'hook', 'hope', 'hover', 'hunt', 'hurry', 'hurt', 'hypothesize', 'identify', | |
'ignore', 'illustrate', 'imagine', 'implement', 'impress', 'improve', 'improvise', 'include', 'increase', | |
'induce', 'influence', 'inform', 'initiate', 'inject', 'injure', 'inlay', 'innovate', 'input', 'inspect', | |
'inspire', 'install', 'institute', 'instruct', 'insure', 'integrate', 'intend', 'intensify', 'interest', | |
'interfere', 'interlay', 'interpret', 'interrupt', 'interview', 'introduce', 'invent', 'inventory', | |
'investigate', 'invite', 'irritate', 'itch', 'jail', 'join', 'joke', 'judge', 'juggle', 'jump', 'justify', | |
'keep', 'kept', 'kick', 'kill', 'kiss', 'kneel', 'knit', 'knock', 'knot', 'know', 'label', 'land', 'last', | |
'laugh', 'launch', 'lead', 'lean', 'leap', 'learn', 'leave', 'lecture', 'lend', 'level', 'license', 'lick', | |
'lifted', 'light', 'lighten', 'like', 'list', 'listen', 'live', 'load', 'locate', 'lock', 'long', 'look', | |
'lose', 'love', 'maintain', 'make', 'manage', 'manipulate', 'manufacture', 'march', 'mark', 'market', | |
'marry', 'match', 'mate', 'matter', 'mean', 'measure', 'meddle', 'mediate', 'meet', 'melt', 'melt', | |
'memorize', 'mend', 'mentor', 'milk', 'mine', 'mislead', 'miss', 'misspell', 'mistake', 'misunderstand', | |
'moan', 'model', 'modify', 'monitor', 'moor', 'motivate', 'mourn', 'move', 'muddle', 'multiply', 'murder', | |
'nail', 'name', 'navigate', 'need', 'negotiate', 'nest', 'nominate', 'normalize', 'note', 'notice', | |
'number', 'obey', 'object', 'observe', 'obtain', 'occur', 'offend', 'offer', 'officiate', 'open', 'operate', | |
'order', 'organize', 'oriented', 'originate', 'overcome', 'overdo', 'overdraw', 'overflow', 'overhear', | |
'overtake', 'overthrow', 'pack', 'paddle', 'paint', 'park', 'part', 'participate', 'pass', 'paste', 'pause', | |
'peck', 'pedal', 'peel', 'peep', 'perceive', 'perfect', 'perform', 'permit', 'persuade', 'phone', | |
'photograph', 'pick', 'pilot', 'pinch', 'pine', 'pinpoint', 'pioneer', 'place', 'plan', 'plant', 'play', | |
'plead', 'please', 'plug', 'point', 'poke', 'polish', 'possess', 'post', 'pour', 'practice', 'praised', | |
'pray', 'preach', 'precede', 'predict', 'prefer', 'prepare', 'prescribe', 'present', 'preserve', 'preset', | |
'preside', 'press', 'pretend', 'prevent', 'prick', 'print', 'process', 'procure', 'produce', 'profess', | |
'program', 'progress', 'project', 'promise', 'promote', 'proofread', 'propose', 'protect', 'prove', | |
'provide', 'publicize', 'pull', 'pump', 'punch', 'puncture', 'punish', 'purchase', 'push', 'qualify', | |
'question', 'queue', 'quit', 'race', 'radiate', 'rain', 'raise', 'rank', 'rate', 'reach', 'read', 'realign', | |
'realize', 'reason', 'receive', 'recognize', 'recommend', 'reconcile', 'record', 'recruit', 'reduce', | |
'refer', 'reflect', 'refuse', 'regret', 'regulate', 'rehabilitate', 'reign', 'reinforce', 'reject', | |
'rejoice', 'relate', 'relax', 'release', 'rely', 'remain', 'remember', 'remind', 'remove', 'render', | |
'reorganize', 'repair', 'repeat', 'replace', 'reply', 'report', 'represent', 'reproduce', 'request', | |
'rescue', 'research', 'resolve', 'respond', 'restored', 'restructure', 'retire', 'retrieve', 'return', | |
'review', 'revise', 'rhyme', 'ride', 'ring', 'rinse', 'rise', 'risk', 'rock', 'roll', 'ruin', 'rule', | |
'rush', 'sack', 'sail', 'satisfy', 'save', 'scare', 'scatter', 'schedule', 'scold', 'scorch', 'scrape', | |
'scratch', 'scream', 'screw', 'scribble', 'scrub', 'seal', 'search', 'secure', 'seek', 'select', 'sell', | |
'send', 'sense', 'separate', 'serve', 'service', 'settle', 'shade', 'shake', 'shape', 'share', 'shave', | |
'shear', 'shed', 'shelter', 'shine', 'shiver', 'shock', 'shoe', 'shoot', 'shop', 'show', 'shrink', 'shrug', | |
'shut', 'sigh', 'sign', 'signal', 'simplify', 'sing', 'sink', 'sketch', 'skip', 'slap', 'slay', 'sleep', | |
'slide', 'sling', 'slink', 'slip', 'slit', 'slow', 'smash', 'smell', 'smile', 'smite', 'smoke', 'snatch', | |
'sneak', 'sneeze', 'sniff', 'snore', 'snow', 'soak', 'solve', 'soothe', 'soothsay', 'sort', 'sound', | |
'spare', 'spark', 'sparkle', 'speak', 'specify', 'speed', 'spell', 'spend', 'spill', 'spin', 'spit', | |
'split', 'spoil', 'spot', 'spray', 'spread', 'spring', 'sprout', 'squash', 'squeak', 'squeal', 'squeeze', | |
'stain', 'stamp', 'stand', 'stare', 'start', 'stay', 'steal', 'steer', 'step', 'stick', 'stimulate', | |
'sting', 'stink', 'stir', 'stitch', 'stop', 'store', 'strap', 'streamline', 'strengthen', 'stretch', | |
'stride', 'strike', 'string', 'strip', 'strive', 'stroke', 'structure', 'study', 'stuff', 'sublet', | |
'subtract', 'succeed', 'suck', 'suffer', 'suggest', 'suit', 'summarize', 'supervise', 'supply', 'support', | |
'suppose', 'surprise', 'surround', 'suspect', 'suspend', 'swear', 'sweat', 'sweep', 'swell', 'swim', | |
'swing', 'switch', 'symbolize', 'synthesize', 'systemize', 'tabulate', 'take', 'talk', 'tame', 'target', | |
'taste', 'teach', 'tear', 'tease', 'telephone', 'tell', 'tempt', 'terrify', 'test', 'thank', 'thaw', | |
'think', 'thrive', 'throw', 'thrust', 'tick', 'tickle', 'time', 'tire', 'touch', 'tour', 'trace', 'trade', | |
'train', 'transcribe', 'transfer', 'transform', 'translate', 'transport', 'trap', 'travel', 'tread', | |
'treat', 'tremble', 'trick', 'trip', 'trot', 'trouble', 'troubleshoot', 'trust', 'tumble', 'turn', 'tutor', | |
'twist', 'type', 'undergo', 'understand', 'undertake', 'undress', 'unfasten', 'unify', 'unite', 'unlock', | |
'unpack', 'untidy', 'update', 'upgrade', 'uphold', 'upset', 'utilize', 'vanish', 'verbalize', 'verify', | |
'visit', 'wail', 'wait', 'wake', 'walk', 'wander', 'want', 'warm', 'warn', 'wash', 'waste', 'watch', | |
'water', 'wave', 'wear', 'weave', 'weep', 'weigh', 'welcome', 'wend', 'whine', 'whip', 'whirl', 'whisper', | |
'whistle', 'wind', 'wink', 'wipe', 'wish', 'withdraw', 'withhold', 'withstand', 'wobble', 'wonder', 'work', | |
'worry', 'wrap', 'wreck', 'wrestle', 'wriggle', 'wring', 'write', 'x-ray', 'yawn', 'yell', 'zoom' | |
]; | |
} | |
} | |
/** | |
* @author Martin Dilling-Hansen <[email protected]> | |
* @date 2015-01-12 | |
*/ | |
class Adjectives implements hasWords | |
{ | |
/** | |
* Get an flat array of words. | |
* | |
* @return array | |
*/ | |
public function getWords() | |
{ | |
return [ | |
'aback', 'abaft', 'abandoned', 'abashed', 'aberrant', 'abhorrent', 'abiding', 'abject', 'ablaze', 'able', | |
'abnormal', 'aboard', 'aboriginal', 'abortive', 'abounding', 'abrasive', 'abrupt', 'absent', 'absorbed', | |
'absorbing', 'abstracted', 'absurd', 'abundant', 'abusive', 'acceptable', 'accessible', 'accidental', | |
'accurate', 'acid', 'acidic', 'acoustic', 'acrid', 'actually', 'adhoc', 'adamant', 'adaptable', 'addicted', | |
'adhesive', 'adjoining', 'adorable', 'adventurous', 'afraid', 'aggressive', 'agonizing', 'agreeable', | |
'ahead', 'ajar', 'alcoholic', 'alert', 'alike', 'alive', 'alleged', 'alluring', 'aloof', 'amazing', | |
'ambiguous', 'ambitious', 'amuck', 'amused', 'amusing', 'ancient', 'angry', 'animated', 'annoyed', | |
'annoying', 'anxious', 'apathetic', 'aquatic', 'aromatic', 'arrogant', 'ashamed', 'aspiring', 'assorted', | |
'astonishing', 'attractive', 'auspicious', 'automatic', 'available', 'average', 'awake', 'aware', 'awesome', | |
'awful', 'axiomatic', 'barbarous', 'bashful', 'bawdy', 'beautiful', 'befitting', 'belligerent', | |
'beneficial', 'bent', 'berserk', 'best', 'better', 'bewildered', 'billowy', 'bite-sized', 'bitter', | |
'bizarre', 'black', 'black-and-white', 'bloody', 'blue', 'blue-eyed', 'blushing', 'boiling', 'boorish', | |
'bored', 'boring', 'bouncy', 'boundless', 'brainy', 'brash', 'brave', 'brawny', 'breakable', 'breezy', | |
'brief', 'bright', 'broad', 'broken', 'brown', 'bumpy', 'burly', 'bustling', 'busy', 'cagey', 'calculating', | |
'callous', 'calm', 'capable', 'capricious', 'careful', 'careless', 'caring', 'cautious', 'ceaseless', | |
'certain', 'changeable', 'charming', 'cheap', 'cheerful', 'chemical', 'chief', 'childlike', 'chilly', | |
'chivalrous', 'chubby', 'chunky', 'clammy', 'classy', 'clean', 'clear', 'clever', 'cloistered', 'cloudy', | |
'closed', 'clumsy', 'cluttered', 'coherent', 'cold', 'colorful', 'colossal', 'combative', 'comfortable', | |
'common', 'complete', 'complex', 'concerned', 'condemned', 'confused', 'conscious', 'cooing', 'cool', | |
'cooperative', 'coordinated', 'courageous', 'cowardly', 'crabby', 'craven', 'crazy', 'creepy', 'crooked', | |
'crowded', 'cruel', 'cuddly', 'cultured', 'cumbersome', 'curious', 'curly', 'curved', 'curvy', 'cute', | |
'cynical', 'daffy', 'daily', 'damaged', 'damaging', 'damp', 'dangerous', 'dapper', 'dark', 'dashing', | |
'dazzling', 'dead', 'deadpan', 'deafening', 'dear', 'debonair', 'decisive', 'decorous', 'deep', 'deeply', | |
'defeated', 'defective', 'defiant', 'delicate', 'delicious', 'delightful', 'demonic', 'delirious', | |
'dependent', 'depressed', 'deranged', 'descriptive', 'deserted', 'detailed', 'determined', 'devilish', | |
'didactic', 'different', 'difficult', 'diligent', 'direful', 'dirty', 'disagreeable', 'disastrous', | |
'discreet', 'disgusted', 'disgusting', 'disillusioned', 'dispensable', 'distinct', 'disturbed', 'divergent', | |
'dizzy', 'domineering', 'doubtful', 'drab', 'draconian', 'dramatic', 'dreary', 'drunk', 'dull', 'dusty', | |
'dynamic', 'dysfunctional', 'eager', 'early', 'earsplitting', 'earthy', 'easy', 'eatable', 'economic', | |
'educated', 'efficacious', 'efficient', 'eight', 'elastic', 'elated', 'elderly', 'electric', 'elegant', | |
'elfin', 'elite', 'embarrassed', 'eminent', 'empty', 'enchanted', 'enchanting', 'encouraging', 'endurable', | |
'energetic', 'enormous', 'entertaining', 'enthusiastic', 'envious', 'equable', 'equal', 'erect', 'erratic', | |
'ethereal', 'evanescent', 'evasive', 'even', 'excellent', 'excited', 'exciting', 'exclusive', 'exotic', | |
'expensive', 'extra-large', 'extra-small', 'exuberant', 'exultant', 'fabulous', 'faded', 'faint', 'fair', | |
'faithful', 'fallacious', 'false', 'familiar', 'famous', 'fanatical', 'fancy', 'fantastic', 'far-flung', | |
'fascinated', 'fast', 'faulty', 'fearful', 'fearless', 'feeble', 'feigned', 'female', 'fertile', 'festive', | |
'fierce', 'filthy', 'fine', 'finicky', 'first', 'five', 'fixed', 'flagrant', 'flaky', 'flashy', 'flat', | |
'flawless', 'flimsy', 'flippant', 'flowery', 'fluffy', 'fluttering', 'foamy', 'foolish', 'foregoing', | |
'forgetful', 'fortunate', 'four', 'frail', 'fragile', 'frantic', 'free', 'freezing', 'frequent', 'fresh', | |
'fretful', 'friendly', 'frightened', 'frightening', 'full', 'fumbling', 'functional', 'funny', 'furry', | |
'furtive', 'future', 'futuristic', 'fuzzy', 'gabby', 'gainful', 'gamy', 'gaping', 'garrulous', 'gaudy', | |
'general', 'gentle', 'giant', 'giddy', 'gifted', 'gigantic', 'glamorous', 'gleaming', 'glib', 'glistening', | |
'glorious', 'glossy', 'godly', 'good', 'goofy', 'gorgeous', 'graceful', 'grandiose', 'grateful', 'gratis', | |
'gray', 'greasy', 'great', 'greedy', 'green', 'grey', 'grieving', 'groovy', 'grotesque', 'grouchy', | |
'grubby', 'gruesome', 'grumpy', 'guarded', 'guiltless', 'gullible', 'gusty', 'guttural', 'habitual', 'half', | |
'hallowed', 'halting', 'handsome', 'handsomely', 'handy', 'hanging', 'hapless', 'happy', 'hard', | |
'hard-to-find', 'harmonious', 'harsh', 'hateful', 'heady', 'healthy', 'heartbreaking', 'heavenly', 'heavy', | |
'hellish', 'helpful', 'helpless', 'hesitant', 'hideous', 'high', 'highfalutin', 'high-pitched', 'hilarious', | |
'hissing', 'historical', 'holistic', 'hollow', 'homeless', 'homely', 'honorable', 'horrible', 'hospitable', | |
'huge', 'hulking', 'humdrum', 'humorous', 'hungry', 'hurried', 'hurt', 'hushed', 'husky', 'hypnotic', | |
'hysterical', 'icky', 'idiotic', 'ignorant', 'illegal', 'ill-fated', 'ill-informed', 'illustrious', | |
'imaginary', 'immense', 'imminent', 'impartial', 'imperfect', 'impolite', 'important', 'imported', | |
'impossible', 'incandescent', 'incompetent', 'inconclusive', 'industrious', 'incredible', 'inexpensive', | |
'infamous', 'innate', 'innocent', 'inquisitive', 'insidious', 'instinctive', 'intelligent', 'interesting', | |
'internal', 'invincible', 'irate', 'irritating', 'itchy', 'jaded', 'jagged', 'jazzy', 'jealous', 'jittery', | |
'jobless', 'jolly', 'joyous', 'judicious', 'juicy', 'jumbled', 'jumpy', 'juvenile', 'kaput', 'keen', 'kind', | |
'kindhearted', 'kindly', 'knotty', 'knowing', 'knowledgeable', 'known', 'labored', 'lackadaisical', | |
'lacking', 'lame', 'lamentable', 'languid', 'large', 'last', 'late', 'laughable', 'lavish', 'lazy', 'lean', | |
'learned', 'left', 'legal', 'lethal', 'level', 'lewd', 'light', 'like', 'likeable', 'limping', 'literate', | |
'little', 'lively', 'living', 'lonely', 'long', 'longing', 'long-term', 'loose', 'lopsided', 'loud', | |
'loutish', 'lovely', 'loving', 'lowly', 'lucky', 'ludicrous', 'lumpy', 'lush', 'luxuriant', 'lying', | |
'lyrical', 'macabre', 'macho', 'maddening', 'madly', 'magenta', 'magical', 'magnificent', 'majestic', | |
'makeshift', 'male', 'malicious', 'mammoth', 'maniacal', 'many', 'marked', 'massive', 'married', | |
'marvelous', 'material', 'materialistic', 'mature', 'mean', 'measly', 'meaty', 'medical', 'meek', 'mellow', | |
'melodic', 'melted', 'merciful', 'mere', 'messy', 'mighty', 'military', 'milky', 'mindless', 'miniature', | |
'minor', 'miscreant', 'misty', 'mixed', 'moaning', 'modern', 'moldy', 'momentous', 'motionless', | |
'mountainous', 'muddled', 'mundane', 'murky', 'mushy', 'mute', 'mysterious', 'naive', 'nappy', 'narrow', | |
'nasty', 'natural', 'naughty', 'nauseating', 'near', 'neat', 'nebulous', 'necessary', 'needless', 'needy', | |
'neighborly', 'nervous', 'next', 'nice', 'nifty', 'nimble', 'nine', 'nippy', 'noiseless', 'noisy', | |
'nonchalant', 'nondescript', 'nonstop', 'normal', 'nostalgic', 'nosy', 'noxious', 'null', 'numberless', | |
'numerous', 'nutritious', 'nutty', 'oafish', 'obedient', 'obeisant', 'obese', 'obnoxious', 'obscene', | |
'obsequious', 'observant', 'obsolete', 'obtainable', 'oceanic', 'offbeat', 'old-fashioned', 'omniscient', | |
'onerous', 'open', 'opposite', 'optimal', 'orange', 'ordinary', 'organic', 'ossified', 'outgoing', | |
'outrageous', 'outstanding', 'oval', 'overconfident', 'overjoyed', 'overrated', 'overt', 'overwrought', | |
'painful', 'painstaking', 'pale', 'paltry', 'panicky', 'panoramic', 'parallel', 'parched', 'parsimonious', | |
'past', 'pastoral', 'pathetic', 'peaceful', 'penitent', 'perfect', 'periodic', 'permissible', 'perpetual', | |
'petite', 'phobic', 'physical', 'picayune', 'pink', 'piquant', 'placid', 'plain', 'plant', 'plastic', | |
'plausible', 'pleasant', 'plucky', 'pointless', 'poised', 'polite', 'political', 'poor', 'possessive', | |
'possible', 'powerful', 'precious', 'premium', 'present', 'pretty', 'previous', 'pricey', 'prickly', | |
'private', 'probable', 'productive', 'profuse', 'protective', 'proud', 'psychedelic', 'psychotic', 'public', | |
'puffy', 'pumped', 'puny', 'purple', 'purring', 'pushy', 'puzzled', 'puzzling', 'quack', 'quaint', | |
'quarrelsome', 'questionable', 'quick', 'quickest', 'quiet', 'quirky', 'quixotic', 'quizzical', 'rabid', | |
'racial', 'ragged', 'rainy', 'rambunctious', 'rampant', 'rapid', 'rare', 'raspy', 'ratty', 'ready', 'real', | |
'rebel', 'receptive', 'recondite', 'redundant', 'reflective', 'regular', 'relieved', 'remarkable', | |
'reminiscent', 'repulsive', 'resolute', 'resonant', 'responsible', 'rhetorical', 'rich', 'right', | |
'righteous', 'rightful', 'rigid', 'ripe', 'ritzy', 'roasted', 'robust', 'romantic', 'roomy', 'rotten', | |
'rough', 'round', 'royal', 'ruddy', 'rude', 'rural', 'rustic', 'ruthless', 'sable', 'safe', 'salty', 'same', | |
'sassy', 'satisfying', 'savory', 'scandalous', 'scarce', 'scared', 'scary', 'scattered', 'scientific', | |
'scintillating', 'scrawny', 'screeching', 'second', 'second-hand', 'secret', 'secretive', 'sedate', | |
'seemly', 'selective', 'selfish', 'separate', 'serious', 'shaggy', 'shaky', 'shallow', 'sharp', 'shiny', | |
'shivering', 'shocking', 'short', 'shrill', 'shut', 'sick', 'silent', 'silky', 'silly', 'simple', | |
'simplistic', 'sincere', 'skillful', 'skinny', 'sleepy', 'slim', 'slimy', 'slippery', 'sloppy', 'slow', | |
'small', 'smart', 'smelly', 'smiling', 'smoggy', 'smooth', 'sneaky', 'snobbish', 'snotty', 'soft', 'soggy', | |
'solid', 'somber', 'sophisticated', 'sordid', 'sore', 'sour', 'sparkling', 'special', 'spectacular', | |
'spicy', 'spiffy', 'spiky', 'spiritual', 'spiteful', 'splendid', 'spooky', 'spotless', 'spotted', 'spotty', | |
'spurious', 'squalid', 'square', 'squealing', 'squeamish', 'staking', 'stale', 'standing', 'statuesque', | |
'steadfast', 'steady', 'steep', 'stereotyped', 'sticky', 'stiff', 'stimulating', 'stingy', 'stormy', | |
'straight', 'strange', 'striped', 'strong', 'stupendous', 'stupid', 'sturdy', 'subdued', 'subsequent', | |
'substantial', 'successful', 'succinct', 'sudden', 'sulky', 'super', 'superb', 'superficial', 'supreme', | |
'swanky', 'sweet', 'sweltering', 'swift', 'symptomatic', 'synonymous', 'taboo', 'tacit', 'tacky', | |
'talented', 'tall', 'tame', 'tangible', 'tangy', 'tart', 'tasteful', 'tasteless', 'tasty', 'tawdry', | |
'tearful', 'tedious', 'teeny', 'teeny-tiny', 'telling', 'temporary', 'tender', 'tense', 'tenuous', | |
'terrible', 'terrific', 'tested', 'testy', 'thankful', 'therapeutic', 'thick', 'thin', 'thinkable', 'third', | |
'thirsty', 'thoughtful', 'thoughtless', 'threatening', 'three', 'thundering', 'tidy', 'tight', | |
'tightfisted', 'tiny', 'tired', 'tiresome', 'toothsome', 'torpid', 'tough', 'towering', 'tranquil', | |
'trashy', 'tremendous', 'tricky', 'trite', 'troubled', 'truculent', 'true', 'truthful', 'typical', | |
'ubiquitous', 'ugliest', 'ugly', 'ultra', 'unable', 'unaccountable', 'unadvised', 'unarmed', 'unbecoming', | |
'unbiased', 'uncovered', 'understood', 'undesirable', 'unequal', 'unequaled', 'uneven', 'unhealthy', | |
'uninterested', 'unique', 'unkempt', 'unknown', 'unnatural', 'unruly', 'unsightly', 'unsuitable', 'untidy', | |
'unused', 'unusual', 'unwieldy', 'unwritten', 'upbeat', 'uppity', 'upset', 'uptight', 'used', 'useful', | |
'useless', 'utopian', 'utter', 'uttermost', 'vacuous', 'vagabond', 'vague', 'valuable', 'various', 'vast', | |
'vengeful', 'venomous', 'verdant', 'versed', 'victorious', 'vigorous', 'violent', 'violet', 'vivacious', | |
'voiceless', 'volatile', 'voracious', 'vulgar', 'wacky', 'waggish', 'waiting', 'wakeful', 'wandering', | |
'wanting', 'warlike', 'warm', 'wary', 'wasteful', 'watery', 'weak', 'wealthy', 'weary', 'well-groomed', | |
'well-made', 'well-off', 'well-to-do', 'whimsical', 'whispering', 'white', 'whole', 'wholesale', 'wicked', | |
'wide', 'wide-eyed', 'wiggly', 'wild', 'willing', 'windy', 'wiry', 'wise', 'wistful', 'witty', 'woebegone', | |
'womanly', 'wonderful', 'wooden', 'woozy', 'workable', 'worried', 'worthless', 'wrathful', 'wretched', | |
'wrong', 'xenophobic', 'yellow', 'yielding', 'young', 'youthful', 'yummy', 'zany', 'zealous', 'zesty', | |
'zippy', 'zonked' | |
]; | |
} | |
} | |
/** | |
* @author Martin Dilling-Hansen <[email protected]> | |
* @date 2015-01-12 | |
*/ | |
class Nouns implements hasWords | |
{ | |
/** | |
* Get an flat array of words. | |
* | |
* @return array | |
*/ | |
public function getWords() | |
{ | |
return [ | |
'account', 'achiever', 'acoustics', 'action', 'activity', 'actor', 'addition', 'adjustment', | |
'advertisement', 'advice', 'aftermath', 'afternoon', 'afterthought', 'agreement', 'airplane', 'airport', | |
'alarm', 'amount', 'amusement', 'anger', 'angle', 'animal', 'answer', 'ants', 'apparatus', 'apparel', | |
'apple', 'apples', 'appliance', 'approval', 'arch', 'argument', 'arithmetic', 'army', 'attack', 'attempt', | |
'attention', 'attraction', 'aunt', 'authority', 'babies', 'baby', 'back', 'badge', 'bait', 'balance', | |
'ball', 'balloon', 'balls', 'banana', 'band', 'base', 'baseball', 'basin', 'basket', 'basketball', 'bath', | |
'battle', 'bead', 'beam', 'bean', 'bear', 'bears', 'beast', 'bedroom', 'beds', 'beef', 'beetle', 'beggar', | |
'beginner', 'behavior', 'belief', 'believe', 'bell', 'bells', 'berry', 'bike', 'bikes', 'bird', 'birds', | |
'birth', 'birthday', 'bite', 'blade', 'blood', 'blow', 'board', 'boat', 'boats', 'body', 'bomb', 'bone', | |
'book', 'books', 'boot', 'border', 'bottle', 'boundary', 'boys', 'brain', 'brake', 'branch', 'brass', | |
'bread', 'breakfast', 'breath', 'brick', 'bridge', 'brother', 'brothers', 'brush', 'bubble', 'bucket', | |
'building', 'bulb', 'burn', 'burst', 'bushes', 'business', 'butter', 'button', 'cabbage', 'cable', 'cactus', | |
'cake', 'cakes', 'calculator', 'calendar', 'camera', 'camp', 'cannon', 'canvas', 'caption', 'card', 'care', | |
'carpenter', 'carriage', 'cars', 'cart', 'cast', 'cats', 'cattle', 'cause', 'cave', 'celery', 'cellar', | |
'cemetery', 'cent', 'chain', 'chair', 'chairs', 'chalk', 'chance', 'change', 'channel', 'cheese', | |
'cherries', 'cherry', 'chess', 'chicken', 'chickens', 'children', 'chin', 'church', 'circle', 'clam', | |
'class', 'clock', 'clocks', 'cloth', 'cloud', 'clouds', 'clover', 'club', 'coach', 'coal', 'coast', 'coat', | |
'cobweb', 'coil', 'collar', 'color', 'comb', 'comfort', 'committee', 'company', 'comparison', 'competition', | |
'condition', 'connection', 'control', 'cook', 'copper', 'copy', 'cord', 'cork', 'corn', 'cough', 'country', | |
'cover', 'cows', 'crack', 'cracker', 'crate', 'crayon', 'cream', 'creator', 'creature', 'credit', 'crib', | |
'crime', 'crook', 'crow', 'crowd', 'crown', 'crush', 'current', 'curtain', 'curve', 'cushion', 'daughter', | |
'death', 'debt', 'decision', 'deer', 'degree', 'design', 'desire', 'desk', 'destruction', 'detail', | |
'development', 'digestion', 'dime', 'dinner', 'dinosaurs', 'direction', 'dirt', 'discovery', 'discussion', | |
'disease', 'disgust', 'distance', 'distribution', 'division', 'dock', 'doctor', 'dogs', 'doll', 'dolls', | |
'donkey', 'door', 'downtown', 'drain', 'drawer', 'dress', 'drink', 'driving', 'drop', 'drug', 'drum', | |
'duck', 'ducks', 'dust', 'earth', 'earthquake', 'edge', 'education', 'effect', 'eggnog', 'eggs', 'elbow', | |
'engine', 'error', 'event', 'example', 'exchange', 'existence', 'expansion', 'experience', 'expert', 'eyes', | |
'face', 'fact', 'fairies', 'fall', 'family', 'fang', 'farm', 'farmer', 'father', 'father', 'faucet', 'fear', | |
'feast', 'feather', 'feeling', 'feet', 'fiction', 'field', 'fifth', 'fight', 'finger', 'finger', 'fire', | |
'fireman', 'fish', 'flag', 'flame', 'flavor', 'flesh', 'flight', 'flock', 'floor', 'flower', 'flowers', | |
'fold', 'food', 'foot', 'force', 'fork', 'form', 'fowl', 'frame', 'friction', 'friend', 'friends', 'frog', | |
'frogs', 'front', 'fruit', 'fuel', 'furniture', 'alley', 'game', 'garden', 'gate', 'geese', 'ghost', | |
'giants', 'giraffe', 'girl', 'girls', 'glass', 'glove', 'glue', 'goat', 'gold', 'goldfish', 'good-bye', | |
'goose', 'government', 'governor', 'grade', 'grain', 'grandfather', 'grandmother', 'grape', 'grass', 'grip', | |
'ground', 'group', 'growth', 'guide', 'guitar', 'hair', 'haircut', 'hall', 'hammer', 'hand', 'hands', | |
'harbor', 'harmony', 'hate', 'head', 'health', 'hearing', 'heart', 'heat', 'help', 'hill', 'history', | |
'hobbies', 'hole', 'holiday', 'home', 'honey', 'hook', 'hope', 'horn', 'horse', 'horses', 'hose', | |
'hospital', 'hour', 'house', 'houses', 'humor', 'hydrant', 'icicle', 'idea', 'impulse', 'income', | |
'increase', 'industry', 'insect', 'instrument', 'insurance', 'interest', 'invention', 'iron', 'island', | |
'jail', 'jeans', 'jelly', 'jellyfish', 'jewel', 'join', 'joke', 'journey', 'judge', 'juice', 'jump', | |
'kettle', 'kick', 'kiss', 'kite', 'kitten', 'kittens', 'kitty', 'knee', 'knife', 'knot', 'knowledge', | |
'laborer', 'lace', 'ladybug', 'lake', 'lamp', 'land', 'language', 'laugh', 'lawyer', 'lead', 'leaf', | |
'learning', 'leather', 'legs', 'letter', 'letters', 'lettuce', 'level', 'library', 'lift', 'light', 'limit', | |
'line', 'linen', 'liquid', 'list', 'lizards', 'loaf', 'lock', 'locket', 'look', 'loss', 'love', 'lumber', | |
'lunch', 'lunchroom', 'machine', 'magic', 'maid', 'mailbox', 'manager', 'marble', 'mark', 'market', 'mask', | |
'mass', 'match', 'meal', 'measure', 'meat', 'meeting', 'memory', 'metal', 'mice', 'middle', 'milk', 'mind', | |
'mine', 'minister', 'mint', 'minute', 'mist', 'mitten', 'money', 'monkey', 'month', 'moon', 'morning', | |
'mother', 'motion', 'mountain', 'mouth', 'move', 'muscle', 'music', 'nail', 'name', 'nation', 'neck', | |
'need', 'needle', 'nerve', 'nest', 'news', 'night', 'noise', 'north', 'nose', 'note', 'notebook', 'number', | |
'oatmeal', 'observation', 'ocean', 'offer', 'office', 'operation', 'opinion', 'orange', 'oranges', 'order', | |
'organization', 'ornament', 'oven', 'owner', 'page', 'pail', 'pain', 'paint', 'pancake', 'paper', 'parcel', | |
'parent', 'park', 'part', 'partner', 'party', 'passenger', 'paste', 'patch', 'payment', 'peace', 'pear', | |
'pencil', 'person', 'pest', 'pets', 'pickle', 'picture', 'pies', 'pigs', 'pipe', 'pizzas', 'place', 'plane', | |
'planes', 'plant', 'plantation', 'plants', 'plastic', 'plate', 'play', 'playground', 'pleasure', 'plot', | |
'plough', 'pocket', 'point', 'poison', 'police', 'polish', 'pollution', 'popcorn', 'porter', 'position', | |
'potato', 'powder', 'power', 'price', 'print', 'prison', 'process', 'produce', 'profit', 'property', | |
'prose', 'protest', 'pull', 'pump', 'punishment', 'purpose', 'push', 'quarter', 'quartz', 'queen', | |
'question', 'quicksand', 'quiet', 'quill', 'quilt', 'quince', 'quiver', 'rabbit', 'rabbits', 'rail', | |
'railway', 'rain', 'rainstorm', 'rake', 'range', 'rate', 'reaction', 'reading', 'reason', 'receipt', | |
'recess', 'record', 'regret', 'relation', 'religion', 'representative', 'request', 'respect', 'rest', | |
'reward', 'rhythm', 'rice', 'riddle', 'rifle', 'ring', 'rings', 'river', 'road', 'robin', 'rock', 'roll', | |
'roof', 'room', 'root', 'rose', 'route', 'rule', 'sack', 'sail', 'salt', 'sand', 'scale', 'scarecrow', | |
'scarf', 'scene', 'scent', 'school', 'science', 'scissors', 'screw', 'seashore', 'seat', 'secretary', | |
'seed', 'selection', 'self', 'sense', 'servant', 'shade', 'shake', 'shame', 'shape', 'sheep', 'sheet', | |
'shelf', 'ship', 'shirt', 'shock', 'shoe', 'shoes', 'shop', 'show', 'side', 'sidewalk', 'sign', 'silk', | |
'silver', 'sink', 'sister', 'sisters', 'size', 'skate', 'skin', 'skirt', 'slave', 'sleep', 'sleet', 'slip', | |
'slope', 'smash', 'smell', 'smile', 'smoke', 'snail', 'snails', 'snake', 'snakes', 'sneeze', 'snow', 'soap', | |
'society', 'sock', 'soda', 'sofa', 'song', 'songs', 'sort', 'sound', 'soup', 'space', 'spade', 'spark', | |
'spiders', 'sponge', 'spoon', 'spot', 'spring', 'square', 'squirrel', 'stage', 'stamp', 'star', 'start', | |
'statement', 'station', 'steam', 'steel', 'stem', 'step', 'stew', 'stick', 'sticks', 'stitch', 'stocking', | |
'stomach', 'stone', 'stop', 'store', 'story', 'stove', 'stranger', 'straw', 'stream', 'street', 'stretch', | |
'string', 'structure', 'substance', 'sugar', 'suggestion', 'suit', 'summer', 'support', 'surprise', | |
'sweater', 'swim', 'swing', 'system', 'table', 'tail', 'talk', 'tank', 'taste', 'teaching', 'team', 'teeth', | |
'temper', 'tendency', 'tent', 'territory', 'test', 'texture', 'theory', 'thing', 'things', 'thought', | |
'thread', 'thrill', 'throat', 'throne', 'thumb', 'thunder', 'ticket', 'tiger', 'time', 'title', 'toad', | |
'toes', 'tomatoes', 'tongue', 'tooth', 'toothbrush', 'toothpaste', 'touch', 'town', 'toys', 'trade', | |
'trail', 'train', 'trains', 'tramp', 'transport', 'tray', 'treatment', 'tree', 'trees', 'trick', 'trip', | |
'trouble', 'trousers', 'truck', 'trucks', 'turkey', 'turn', 'twig', 'twist', 'umbrella', 'uncle', | |
'underwear', 'unit', 'vacation', 'value', 'vase', 'vegetable', 'veil', 'vein', 'verse', 'vessel', 'vest', | |
'view', 'visitor', 'voice', 'volcano', 'volleyball', 'voyage', 'walk', 'wall', 'wash', 'waste', 'watch', | |
'water', 'wave', 'waves', 'wealth', 'weather', 'week', 'weight', 'wheel', 'whip', 'whistle', 'wilderness', | |
'wind', 'window', 'wine', 'wing', 'winter', 'wire', 'wish', 'woman', 'women', 'wood', 'wool', 'word', | |
'work', 'worm', 'wound', 'wren', 'wrench', 'wrist', 'writer', 'writing', 'yard', 'yarn', 'year', 'yoke', | |
'zebra', 'zephyr', 'zinc', 'zipper', 'zoo' | |
]; | |
} | |
} | |
/** | |
* @author Martin Dilling-Hansen <[email protected]> | |
* @date 2015-01-12 | |
*/ | |
class Animals implements hasWords | |
{ | |
/** | |
* Get an flat array of words. | |
* | |
* @return array | |
*/ | |
public function getWords() | |
{ | |
return [ | |
'aardvark', 'albatross', 'alligator', 'alpaca', 'anteater', 'antelope', 'armadillo', 'baboon', | |
'badger', 'barracuda', 'bear', 'beaver', 'bison', 'buffalo', 'butterfly', 'camel', 'capybara', | |
'caribou', 'cassowary', 'caterpillar', 'cattle', 'chamois', 'cheetah', 'chicken', 'chimpanzee', | |
'chinchilla', 'chough', 'clam', 'cobra', 'cockroach', 'cormorant', 'coyote', 'crab', 'crane', | |
'crocodile', 'crow', 'curlew', 'deer', 'dinosaur', 'dogfish', 'dolphin', 'donkey', 'dotterel', | |
'dove', 'dragonfly', 'dugong', 'dunlin', 'eagle', 'echidna', 'eland', 'elephant', | |
'falcon', 'ferret', 'finch', 'fish', 'flamingo', 'frog', 'gaur', 'gazelle', 'gerbil', 'giraffe', | |
'gnat', 'goat', 'goldfinch', 'goldfish', 'goose', 'gorilla', 'goshawk', 'grasshopper', 'grouse', | |
'guanaco', 'gull', 'hamster', 'hare', 'hawk', 'hedgehog', 'heron', 'herring', 'hippopotamus', 'hornet', | |
'horse', 'human', 'hummingbird', 'hyena', 'ibex', 'ibis', 'jackal', 'jaguar', 'jellyfish', 'kangaroo', | |
'kingfisher', 'koala', 'kookabura', 'kouprey', 'kudu', 'lapwing', 'lark', 'lemur', 'leopard', 'lion', 'llama', | |
'lobster', 'locust', 'loris', 'louse', 'lyrebird', 'magpie', 'manatee', 'mandrill', 'mantis', 'marten', | |
'meerkat', 'mink', 'mole', 'mongoose', 'monkey', 'moose', 'mosquito', 'mouse', 'mule', 'narwhal', 'newt', | |
'nightingale', 'octopus', 'okapi', 'opossum', 'oryx', 'ostrich', 'otter', 'oyster', 'panda', 'panther', | |
'parrot', 'partridge', 'peafowl', 'pelican', 'penguin', 'pheasant', 'pigeon', 'pony', 'porcupine', 'porpoise', | |
'quail', 'quelea', 'quetzal', 'rabbit', 'raccoon', 'rail', 'raven', 'reindeer', 'rhinoceros', 'rook', | |
'salamander', 'salmon', 'sandpiper', 'sardine', 'scorpion', 'seahorse', 'seal', 'shark', 'shrew', 'skunk', | |
'snail', 'snake', 'sparrow', 'spider', 'spoonbill', 'squid', 'squirrel', 'starling', 'stingray', 'stinkbug', | |
'stork', 'swallow', 'swan', 'tapir', 'tarsier', 'termite', 'tiger', 'toad', 'trout', 'turkey', 'turtle', | |
'vicuna', 'viper', 'vulture', 'wallaby', 'walrus', 'wasp', 'weasel', 'whale', 'wolf', 'wolverine', 'wombat', | |
'woodcock', 'woodpecker', 'worm', 'wren', 'zebra' | |
]; | |
} | |
} | |
/** | |
* @author Martin Dilling-Hansen <[email protected]> | |
* @date 2015-01-12 | |
*/ | |
class Colors implements hasWords | |
{ | |
/** | |
* Get an flat array of words. | |
* | |
* @return array | |
*/ | |
public function getWords() | |
{ | |
return [ | |
'aqua', 'black', 'blue', 'fuchsia', 'gray', 'green', 'lime', 'maroon', 'navy', 'olive', 'orange', 'purple', | |
'silver', 'teal', 'white', 'yellow' | |
]; | |
} | |
} | |
class Password | |
{ | |
/** | |
* Generate a random password. | |
* | |
* @return string | |
*/ | |
public static function generate() | |
{ | |
$password = ''; | |
$password .= new Word(new Verbs); | |
$password .= '-'; | |
$password .= new Word(new Adjectives); | |
$password .= '-'; | |
$password .= new Word(new Nouns); | |
$password .= '-'; | |
// $password .= new Word(new Animals); | |
// $password .= '-'; | |
// $password .= new Word(new Colors); | |
// $password .= '-'; | |
$password .= self::getRandomNumber(2); | |
return $password; | |
} | |
/** | |
* Generate a random number padded with zeros to match length of $digits | |
* | |
* @param int $digits | |
* | |
* @return string | |
*/ | |
static protected function getRandomNumber($digits) | |
{ | |
return str_pad(rand(0, pow(10, $digits)-1), $digits, '0', STR_PAD_LEFT); | |
} | |
} | |
for ($i = 0; $i < 50; $i++) { | |
echo Password::generate() . "<br>\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment