* Encrypt the string with fixed salt
*
* @param $str The unencrypted string
+ * @param $key Optional key, if none provided, a random key will be generated
* @return $encrypted Encrypted string
*/
- public function encryptStream ($str) {
+ public function encryptStream ($str, $key = NULL) {
// Just handle it over
$encrypted = (string) $str;