Streamable and for encryption added, CryptoHelper (a facade) rewritten to use streams
[core.git] / inc / classes / main / streams / class_BaseStream.php
index e226545a11863b7596788345d1b1c0ea5d064e2e..728e6c3e4c4c72a6fbe789ccc4f10fdad458281d 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseStream extends BaseFrameworkSystem {
+       /**
+        * Random number generator instance (RNG)
+        */
+       private $rngInstance = null;
+
        /**
         * Protected constructor
         *
@@ -36,6 +41,25 @@ class BaseStream extends BaseFrameworkSystem {
                $this->removeNumberFormaters();
                $this->removeSystemArray();
        }
+
+       /**
+        * Setter for RNG instance
+        *
+        * @param       $rngInstance    An RNG instance
+        * @return      void
+        */
+       protected final function setRngInstance (RandomNumberGenerator $rngInstance) {
+               $this->rngInstance = $rngInstance;
+       }
+
+       /**
+        * Getter for RNG instance
+        *
+        * @return      $rngInstance    An RNG instance
+        */
+       protected final function getRngInstance () {
+               return $this->rngInstance;
+       }
 }
 
 // [EOF]