McryptRijndael128.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /*
  3. * The RandomLib library for securely generating random numbers and strings in PHP
  4. *
  5. * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
  6. * @copyright 2011 The Authors
  7. * @license http://www.opensource.org/licenses/mit-license.html MIT License
  8. * @version Build @@version@@
  9. */
  10. /**
  11. * mcrypt mixer using the Rijndael cipher with 128 bit block size
  12. *
  13. * PHP version 5.3
  14. *
  15. * @category PHPCryptLib
  16. * @package Random
  17. * @subpackage Mixer
  18. *
  19. * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
  20. * @copyright 2013 The Authors
  21. * @license http://www.opensource.org/licenses/mit-license.html MIT License
  22. *
  23. * @version Build @@version@@
  24. */
  25. namespace RandomLib\Mixer;
  26. use RandomLib\AbstractMcryptMixer;
  27. use SecurityLib\Strength;
  28. /**
  29. * mcrypt mixer using the Rijndael cipher with 128 bit block size
  30. *
  31. * @category PHPCryptLib
  32. * @package Random
  33. * @subpackage Mixer
  34. *
  35. * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
  36. * @author Chris Smith <chris@cs278.org>
  37. */
  38. class McryptRijndael128 extends AbstractMcryptMixer
  39. {
  40. /**
  41. * {@inheritdoc}
  42. */
  43. public static function getStrength()
  44. {
  45. return new Strength(Strength::HIGH);
  46. }
  47. /**
  48. * {@inheritdoc}
  49. */
  50. protected function getCipher()
  51. {
  52. return 'rijndael-128';
  53. }
  54. }