original_string: public function signStream($stream, $privateKey)
      {
          try {
              $virgilSourceStream = new VirgilStreamDataSource($stream);
              $virgilSourceStream->reset();
  
              return (new CryptoVirgilStreamSigner($this->hashAlgorithm))->sign(
                  $virgilSourceStream,
                  $privateKey
              );
          } catch (Exception $exception) {
              throw new ContentSigningException($exception->getMessage(), $exception->getCode());
          }
      }
code: public function signStream($stream, $privateKey)
      {
          try {
              $virgilSourceStream = new VirgilStreamDataSource($stream);
              $virgilSourceStream->reset();
  
              return (new CryptoVirgilStreamSigner($this->hashAlgorithm))->sign(
                  $virgilSourceStream,
                  $privateKey
              );
          } catch (Exception $exception) {
              throw new ContentSigningException($exception->getMessage(), $exception->getCode());
          }
      }
code_tokens: public function signStream ( $ stream , $ privateKey ) { try { $ virgilSourceStream = new VirgilStreamDataSource ( $ stream ) ; $ virgilSourceStream -> reset ( ) ; return ( new CryptoVirgilStreamSigner ( $ this -> hashAlgorithm ) ) -> sign ( $ virgilSourceStream , $ privateKey ) ; } catch ( Exception $ exception ) { throw new ContentSigningException ( $ exception -> getMessage ( ) , $ exception -> getCode ( ) ) ; } }
docstring: Sign stream with a private key
  
  @param resource $stream
  @param string   $privateKey
  
  @return string
  
  @throws ContentSigningException
docstring_tokens: Sign stream with a private key