X-Git-Url: https://git.stricted.de/?p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git;a=blobdiff_plain;f=CryptLib%2FCore%2FStrength.php;fp=CryptLib%2FCore%2FStrength.php;h=60c53720c3ed734c2cb39035f39fa4f59dd7aa31;hp=0000000000000000000000000000000000000000;hb=14d4f286d33b631a93207e4d13086c0a3bc0df12;hpb=c9e082da5cc662b64a74d3770f13d1270068678f diff --git a/CryptLib/Core/Strength.php b/CryptLib/Core/Strength.php new file mode 100644 index 0000000..60c5372 --- /dev/null +++ b/CryptLib/Core/Strength.php @@ -0,0 +1,59 @@ + + * @copyright 2011 The Authors + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version Build @@version@@ + */ + +namespace CryptLib\Core; + +/** + * The strength FlyweightEnum class + * + * All mixing strategies must extend this class + * + * @category PHPCryptLib + * @package Core + * @author Anthony Ferrara + */ +class Strength extends Enum { + + /** + * We provide a default value of VeryLow so that we don't accidentally over + * state the strength if we forget to pass in a value... + */ + const __DEFAULT = self::VERYLOW; + + /** + * This represents Non-Cryptographic strengths. It should not be used any time + * that security or confidentiality is at stake + */ + const VERYLOW = 1; + + /** + * This represents the bottom line of Cryptographic strengths. It may be used + * for low security uses where some strength is required. + */ + const LOW = 3; + + /** + * This is the general purpose Cryptographical strength. It should be suitable + * for all uses except the most sensitive. + */ + const MEDIUM = 5; + + /** + * This is the highest strength available. It should not be used unless the + * high strength is needed, due to hardware constraints (and entropy + * limitations). + */ + const HIGH = 7; + +}