1<?php 2/** 3 * The strength FlyweightEnum class 4 * 5 * PHP version 5.3 6 * 7 * @category PHPPasswordLib 8 * @package Core 9 * @author Anthony Ferrara <ircmaxell@ircmaxell.com> 10 * @copyright 2011 The Authors 11 * @license http://www.opensource.org/licenses/mit-license.html MIT License 12 * @version Build @@version@@ 13 */ 14 15namespace SecurityLib; 16 17/** 18 * The strength FlyweightEnum class 19 * 20 * All mixing strategies must extend this class 21 * 22 * @category PHPPasswordLib 23 * @package Core 24 * @author Anthony Ferrara <ircmaxell@ircmaxell.com> 25 */ 26class Strength extends Enum { 27 28 /** 29 * We provide a default value of VeryLow so that we don't accidentally over 30 * state the strength if we forget to pass in a value... 31 */ 32 const __DEFAULT = self::VERYLOW; 33 34 /** 35 * This represents Non-Cryptographic strengths. It should not be used any time 36 * that security or confidentiality is at stake 37 */ 38 const VERYLOW = 1; 39 40 /** 41 * This represents the bottom line of Cryptographic strengths. It may be used 42 * for low security uses where some strength is required. 43 */ 44 const LOW = 3; 45 46 /** 47 * This is the general purpose Cryptographical strength. It should be suitable 48 * for all uses except the most sensitive. 49 */ 50 const MEDIUM = 5; 51 52 /** 53 * This is the highest strength available. It should not be used unless the 54 * high strength is needed, due to hardware constraints (and entropy 55 * limitations). 56 */ 57 const HIGH = 7; 58 59} 60