original_string: public function signature($signature, $private_key = false) {
  		
  		$signature = strtoupper($signature);
  		
  		// RSA-SHA1 public key/private key encryption
  		if ($signature == 'RSA' || $signature == 'RSA-SHA1') {
  			
  			// private key must be provided
  			if (!$private_key){
  				return false;
  			}
  			
  			// signature method set to RSA-SHA1 using this private key (interacts with OAuth class)
  			$this->signature = new RsaSha1($private_key);
  			
  			return true;
  			
  		} elseif ($signature == 'HMAC' || $signature == 'HMAC-SHA1') {
  			
  			// signature method set to HMAC-SHA1 - no private key
  			$this->signature = new HmacSha1;
  			
  			return true;
  		} else {
  			// signature method was not recognised
  			return false;
  		}
  		
  	}
code: public function signature($signature, $private_key = false) {
  		
  		$signature = strtoupper($signature);
  		
  		// RSA-SHA1 public key/private key encryption
  		if ($signature == 'RSA' || $signature == 'RSA-SHA1') {
  			
  			// private key must be provided
  			if (!$private_key){
  				return false;
  			}
  			
  			// signature method set to RSA-SHA1 using this private key (interacts with OAuth class)
  			$this->signature = new RsaSha1($private_key);
  			
  			return true;
  			
  		} elseif ($signature == 'HMAC' || $signature == 'HMAC-SHA1') {
  			
  			// signature method set to HMAC-SHA1 - no private key
  			$this->signature = new HmacSha1;
  			
  			return true;
  		} else {
  			// signature method was not recognised
  			return false;
  		}
  		
  	}
code_tokens: public function signature ( $ signature , $ private_key = false ) { $ signature = strtoupper ( $ signature ) ; // RSA-SHA1 public key/private key encryption if ( $ signature == 'RSA' || $ signature == 'RSA-SHA1' ) { // private key must be provided if ( ! $ private_key ) { return false ; } // signature method set to RSA-SHA1 using this private key (interacts with OAuth class) $ this -> signature = new RsaSha1 ( $ private_key ) ; return true ; } elseif ( $ signature == 'HMAC' || $ signature == 'HMAC-SHA1' ) { // signature method set to HMAC-SHA1 - no private key $ this -> signature = new HmacSha1 ; return true ; } else { // signature method was not recognised return false ; } }
docstring: Set the signing method to be used to encrypt request signature.
  
  @param string $signature         Signature encryption method: RSA|HMAC
  @param string $private_key       openssl RSA private key (only needed if using RSA)
  @return boolean                  true if able to use this signing type
docstring_tokens: Set the signing method to be used to encrypt request signature .