summaryrefslogtreecommitdiffstats
path: root/Core/Util/SecureRandomInterface.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2012-10-27 10:45:19 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2012-10-28 08:06:38 +0100
commit01ac68a3cee68d8ab99d0da264e7ca332b7e3df9 (patch)
treecfaff00496db3063e6918d457e12315fdd98034b /Core/Util/SecureRandomInterface.php
parent1fd9900caddeb88e2882e7572c5345bdf6769ba5 (diff)
downloadsymfony-security-01ac68a3cee68d8ab99d0da264e7ca332b7e3df9.zip
symfony-security-01ac68a3cee68d8ab99d0da264e7ca332b7e3df9.tar.gz
symfony-security-01ac68a3cee68d8ab99d0da264e7ca332b7e3df9.tar.bz2
added a SecureRandomInterface
Diffstat (limited to 'Core/Util/SecureRandomInterface.php')
-rw-r--r--Core/Util/SecureRandomInterface.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/Core/Util/SecureRandomInterface.php b/Core/Util/SecureRandomInterface.php
new file mode 100644
index 0000000..f2d8175
--- /dev/null
+++ b/Core/Util/SecureRandomInterface.php
@@ -0,0 +1,31 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Security\Core\Util;
+
+use Symfony\Component\HttpKernel\Log\LoggerInterface;
+
+/**
+ * A secure random number generator implementation.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+interface SecureRandomInterface
+{
+ /**
+ * Generates the specified number of secure random bytes.
+ *
+ * @param integer $nbBytes
+ *
+ * @return string
+ */
+ public function nextBytes($nbBytes);
+}